I want that if you launch the App for the first Time, a certain UIView
opens. But if you launch
it later this UIView
shouldn't be able to see.
How can I program this ?
I use Storyboards and I've setter up my view already in Storyboard.
Here is what I've already coded:
- (void)viewDidLoad {
[super viewDidLoad];
if ( ![[NSUserDefaults standardUserDefaults]
boolForKey:@"hasPerformedFirstLaunch"]) {
//View opens
[[NSUserDefaults standardUserDefaults] setBool:YES
forKey:@"hasPerformedFirstLaunch"];
[[NSUserDefaults standardUserDefaults] synchronize];
} else {
//RootView opens
}
// Do any additional setup after loading the view, typically from a nib.
}
So what can I enter at //View opens and //RootView opens? Thank you really much!