ios开发-判断手机APP第一次启动
代码:
//判断是不是第一次启动 if (![[NSUserDefaults standardUserDefaults]boolForKey:@"fristLaunch11"]) { [[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"fristLaunch11"]; [[NSUserDefaults standardUserDefaults] synchronize]; //使启动界面停留 2.0 秒 [NSThread sleepForTimeInterval:2.0]; userGuideViewController = [[UserGuideViewController alloc] init]; self.window.rootViewController = userGuideViewController;//设置启动根视图 [userGuideViewController release]; } else { [NSThread sleepForTimeInterval:2.0]; getPicViewController = [[GetPicViewController alloc] init]; self.window.rootViewController = getPicViewController; [getPicViewController release]; }
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/app/5254.html