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];
}</pre>
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。