开发者

switching between views in iphone programming [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

View Controllers: How to switch between views programmatically?

i want to go to another view from one view on a button click please help me..开发者_开发知识库...... thank you


Use a UINavigationController to display the first view. When the user taps your button, call the navigation controller's pushViewController:animated: method. To return to the previous view programmatically, call one of the pop...ViewController... methods (though this may not be required, since the navigation controller itself can handle "back" button taps).


If you don't want to use the uiNevigationController then use:

[self.view addSubView:objectOfSecondPage.view];

and add this on the back button in the next page

[removeFrom SuperView];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜