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];
精彩评论