您的位置:首页 > 移动开发

ios开发-判断手机APP第一次启动

2014-01-26 16:08 405 查看
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];
    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios开发