selecting alternative first view controller from story board at application startup

后端 未结 4 1304
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 08:04

I\'ve just started on iOS programming and so far the tutorials and answers I found here have been a great help to move forward. However, this particular problem has been bum

4条回答
  •  余生分开走
    2020-12-29 08:56

    You can just reset the root view controller of the window

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
          (NSDictionary *)launchOptions
    {
       if(your_condition) {
           UIViewController *newRoot = [your implementation];
           self.window.rootViewController = newRoot;
       }
       return YES;
    }
    

    This is worked for me, Xcode5.0.1

提交回复
热议问题