首页 > 代码库 > storyBoard中切换应用启动的切入点方法

storyBoard中切换应用启动的切入点方法

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    

    if (![[NSUserDefaults standardUserDefaults] boolForKey:@"FristTime"]) {

       //默认的切入点 

        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"FristTime"];

        [[NSUserDefaults standardUserDefaults] synchronize];

        

    }else

    {

//切换到另一个 storyBoard 为入口

        UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"FirstTabStoryboard" bundle:nil];

        self.window.rootViewController = [storyBoard instantiateInitialViewController];

    }

    // Override point for customization after application launch.

    return YES;

}

storyBoard中切换应用启动的切入点方法