0

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

Community
  • 1
  • 1
Ranjeet Sajwan
  • 1,925
  • 2
  • 28
  • 60
  • http://stackoverflow.com/questions/3323942/iphone-how-to-switch-between-subviews-that-were-created-in-interface-builder – jtbandes Jul 24 '10 at 06:02

2 Answers2

0

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).

Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365
0

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];
keithxm23
  • 1,280
  • 1
  • 21
  • 41
Anshuman
  • 25
  • 1
  • 6