iOS开发之 -- 判断是否第一次登陆APP
判断是否第一次登陆app,具体方法如下:
if (![[NSUserDefaults standardUserDefaults]boolForKey:@"firstLaunch"]) { NSLog(@"first time to launch "); [[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"firstLaunch"]; [[NSUserDefaults standardUserDefaults]setBool:NO forKey:@"everLaunch"]; }else { NSLog(@"ever launched "); [[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"everLaunch"]; }
本文来自博客园,作者:稻草人11223,转载请注明原文链接:https://www.cnblogs.com/hero11223/p/6943385.html