views:

213

answers:

2

Hi,

I asked a question on here last week and I have tried to follow examples but not having much joy,

So I am trying to create a app that will have a main window. In this window I want to be able to display 3 or 4 different views (not at the same time) which the user can select the view via a button press. I did not want to use a navigation bar if possible.

am I right in thinking that I will need

View1 .h &.m View1controller .h &.m and the same for the second etc

Now if the button to select view 2 is on view 1,

how do I change the view and where do I put this code? Do I need a root-controller or am i getting confused with other ways of doing the same thing.

Thank you in advance for your help.

+1  A: 

If you want to change between the views like in the iPod application, you can accomplish this with a UITabBarController. You would create all the view controllers, and add then to a root tabbarcontroller. The tabbarcontroller then serves to automatically switch between views for you when the button is selected.

Dan Lorenc
A: 

If you have a view with a button on, and want to change the active view u can use this method from UIViewController of the active view:

- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated;

Here are some simple iPhone tutorials, perhaps you can learn faster with it.

I hope I could help you - Eny.

Enyra