views:

235

answers:

1

I am beginning in iPhone development and have followed a few tutorials, but please indicate me if I'm going in the wrong direction. I have implemented my own UInViewController and a login screen view (with its xib).

What I would like to do is that after clicking on the login button, it displays the RootViewController.xib, which includes the Xcode's default navigation application template.

Is that possible? How?

Thanks alot for your help.

+1  A: 

Send a notification to your AppDelegate when you do the login and remove the view from the keyWindow an add the navigationController to the same keyWindow.

- (void) applicationDidFinishLaunching: (UIApplication*) application {
    [_window addSubview: [_loginViewController view]];
    [_window makeKeyAndVisible];
}

// This method is on AppDelegate   
- (void) loginComplete {
    [[_loginViewController view] removeFromSuperview];
    [_window addSubview: [_navigationController view]];
}
Espuz
that's exactly what I needed, thank you
DavidD