I got a problem of my iOS app recently. In my app, an instruction view will appear at the first time of running, then hide from then on. How can I implement this effect?
Try to use this function:
- (BOOL) isFirstRun { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if ([defaults objectForKey:@"isFirstRun"]) { return NO; } [defaults setObject:[NSDate date] forKey:@"isFirstRun"]; [[NSUserDefaults standardUserDefaults] synchronize]; return YES; }