开发者

switching between views in iphone programming [duplicate]

开发者 https://www.devze.com 2023-01-08 07:18 出处:网络
This question already has answers here: Closed 10 years ago. Possible Duplicate: View Controllers: How to switch between views programmatically?
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

精彩评论

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