开发者

How can i navigate forward and backward with out navigation controller

i am using UIViewcontroller in my application and i want to navigate forward when click 开发者_Go百科on the button, and in 2nd view when i click back, the view is navigate back like navigation controller.How can i do this?I am not using navigation controller and i can't.Thanks


You can add the second view as a subview of first one (with same size), to come back in to first view use the function removeFromSuperView from second view.


use the following code With navigation controller push the controller

        DetailView *detailObj = [[DetailView alloc] initWithNibName:@"DetailView_Phone" bundle:[NSBundle mainBundle]];

[self.navigationController pushViewController:detailObj animated:YES];

pop the controller

[self.navigationController popViewControllerAnimated:YES];

check out the link for help without navigation controller.

if you have a problem with navigation bar u can hide it also.

[self presentModalViewController:anotherViewController animated:YES];

using this u can move one view to another view

Regards,

Shyam

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜