Skip to content

Instantly share code, notes, and snippets.

@itsavi
Created April 18, 2016 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsavi/19b0721fd31df4be7aac3d2d1caed21d to your computer and use it in GitHub Desktop.
Save itsavi/19b0721fd31df4be7aac3d2d1caed21d to your computer and use it in GitHub Desktop.
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"hasPerformedFirstLaunch"]) {
// On first launch, this block will execute
// Place code here
[self performSegueWithIdentifier:@"next" sender:self];
// Set the "hasPerformedFirstLaunch" key so this block won't execute again
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"hasPerformedFirstLaunch"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
else {
// On subsequent launches, this block will execute
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment