Skip to content

Instantly share code, notes, and snippets.

@romyilano
Created December 11, 2012 12:25
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 romyilano/4258203 to your computer and use it in GitHub Desktop.
Save romyilano/4258203 to your computer and use it in GitHub Desktop.
how to run something only the 1st time an ios app launches
// http://stackoverflow.com/questions/9450391/show-screen-on-first-launch-only-in-ios
if (![@"1" isEqualToString:[[NSUserDefaults standardUserDefaults]
objectForKey:@"Avalue"]]) {
[[NSUserDefaults standardUserDefaults] setValue:@"1" forKey:@"Avalue"];
[[NSUserDefaults standardUserDefaults] synchronize];
//Action here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment