判断是否第一次登陆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"]; }