Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tombuarts

macrumors newbie
Original poster
Jan 30, 2010
15
0
I am working on an app that currently has 3 views that load from a main view. They are controlled by 3 buttons on the main view that swap out each view. I would like to add a new view that is controlled by a button on one of the 3 individual views. I want this view to either be modal or simply be "on top" of the other views until it is dismissed. Is there a way to load this view easily? All sample code I have seen seems to be awfully complicated for something that seems as easy as loading a view. Any help would be greatly appreciated.
 
Set up an action method for a button on the view that you want to click to present another view. Put it in the view controller of the view you want to have the button in.

Hope that makes sense - if you need a code snippet let me know.
 
Is there a way to load this view easily?
Fairly easily, using something known as presenting a modal view.

All sample code I have seen seems to be awfully complicated for something that seems as easy as loading a view. Any help would be greatly appreciated.
Check out the AddMusic, CoreDataBooks, CryptoExercise, iPhoneCoreDataRecipes, MailComposer samples apps. Once you looked into those, you can probably google to find a simple tutorial that goes over the technique (and UIViewController instance method you will be using).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.