An easy way to do this is to make an IBOutlet for each of the 2 different views you want switch from, and add them to your main view in Interface Builder.
Once the code and Interface are linked up, create a button that calls an action that will switch the views. Pseudo code:
***MyAppViewController.h***
..
IBOutlet UIView *view1;
IBOutlet UIView *view2;
UIView *currentView;
..
***MyAppViewController.m***
..//in view did load, or init function
[self.view addSubView:view1];
[self.view addSubView:view2];
currentView = view1;
[currentView bringToFront];
..
..
-(IBAction)switchView
{
if(currentView == view1)
currentView = view2;
else
currentView = view1;
[currentView bringToFront];
}
..
This might not be the neatest way to do it, but it works. Some would decide to load and unload views as needed, rather than loading them ALL then rearranging the order. Ultimately, it's up to you. With only two views, and assuming there isn't much data on them, this is fine.