iPhone SDK: how to switch from a login screen to a navigation interface?

后端 未结 1 1847
我寻月下人不归
我寻月下人不归 2020-12-29 17:09

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 UInViewContro

相关标签:
1条回答
  • 2020-12-29 17:41

    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]];
    }
    
    0 讨论(0)
提交回复
热议问题