美文网首页
判断app第一次被打开

判断app第一次被打开

作者: CodingIran | 来源:发表于2015-11-23 15:55 被阅读29次
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    BOOL firstTime = [[NSUserDefaults standardUserDefaults] integerForKey:@"FirstLaunch"];
    if (!firstTime) {
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"FirstLaunch"];
        NSLog(@"first lanch!");
}
    return YES;
}

相关文章

网友评论

      本文标题:判断app第一次被打开

      本文链接:https://www.haomeiwen.com/subject/fksrhttx.html