ios开发-判断手机APP第一次启动
代码:
代码语言:javascript复制 //判断是不是第一次启动
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>