views:

1170

answers:

3

I've gone through most of the example code and I still need some help. I want to make an uber-simple app: show one screen at startup with a label and a button. click the button and we slide over to another screen (I suppose these are called views) which has another label and the "back" button in the top menu bar. I just want to click back and forth between the two screens.

How do I do this?

+2  A: 

You'll need to use a UINavigationController to accomplish the "slide"/"back button" behavior you're talking about. It is as simple as you might think, as long as the app is setup correctly. Essentially, UINavigationControllers allow you to push and pop instances of UIViewController or subclasses thereof, and take care of the animation and view history tracking for you.

The best way to get started, by far, is just open XCode, choose "New Project", and start with the "Navigation-Based Application." Dig around that project for a while and I think you'll start to see clearly what needs to be done.

rpj
+3  A: 

Take a look at the NavBar sample on Apple's Developer website. http://developer.apple.com/iphone/library/samplecode/NavBar/index.html

Ben Gottlieb
A: 

You can checkout how to get started with that using this tutorial: at wattz.net