Is there an easy way to have an alert appear only the first time an app is launched, or will I ha开发者_JAVA技巧ve to do it manually by making a BOOL and having it set to FALSE after it's run the first time?
Sounds easy enough...
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if(![defaults boolForKey:@"hasBeenLaunchedBefore"]) {
//Show alert
[defaults setBool:YES forKey:@"hasBeenLaunchedBefore"];
[defaults synchronize];
}
精彩评论