I've been working for a while now on switching UIViews, and am trying a basic UIView switch, without using UINavigationController. I've looked into UINavigationControllers, but I have been wrestling with the below for so long that I want to explore it fully.

My project organisation is:

```
MainViewController.h/.m    -> viewDidLoad: This method runs a NSTimer to update self.view with a few bits and bobs.

ConfigView.h/.m: -> viewDidLoad: nothing - just an idle view.  

MainViewController.xib     -> Main window NIB

ConfigView.xib   -> ConfigView NIB

```

I have the following method in MainViewController.m execute on a UIButton press event:

```
- (IBAction)switchToConfigView:(id)sender {

if(self.configViewController == nil) {
    ConfigView *cv = [[ConfigView alloc] initWithNibName:@"ConfigView" bundle:nil];
    self.configViewController = cv;
    [cv release];
}

[self.view addSubview:configViewController.view];

}

```

Now, when I switch to the ConfigView, the view is indeed displayed, but it appears that viewDidLoad: from MainViewController still executes, causing both views to effectively be merged. From the code, I can see that this is obviously the case, as the actual view switch itself is performed within the MainViewController context, and as you can see, simply a subview.

My question is, how do I neatly tuck away/pause all goings-on within MainViewController when switching the view by just adding another subview to it? My guess is that it's not possible, or rather it's a lot of leg work where some other methodology would be better applied. I suspect I need to implement the actual switch from the ConfigView.h/.m but I could be wrong.

Any light you can shed on the above would be grand.

thanks

swisscheese.