1 #import "AppDelegate.h" 2 3 @interface AppDelegate () 4 5 @end 6 7 @implementation AppDelegate 8 9 10 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 11 12 //获取LoginAndRegister的StoryBoard 13 //展示window 14 [self.window makeKeyAndVisible]; 15 16 UIStoryboard *loginStoryboard = [UIStoryboard storyboardWithName:@"LoginAndRegeist" bundle:nil]; 17 UIViewController *loginVC = [loginStoryboard instantiateInitialViewController]; 18 19 //模态登录页面 20 [self.window.rootViewController presentViewController:loginVC animated:YES completion:nil]; 21 22 23 return YES; 24 }
由于系统默认加载main.storyboard,所以当我们添加了其他的storyboard之后想要先加载到我们自定的storyboard则需在appdelegate里面进行相应的设置