Hi, i want to modally show a viewcontroller when my application launches the first time. I use NSUserDefaults for that:
Code:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
//Check if it's first lauch
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
if (! [prefs boolForKey:@"notFirstRun"])
{
NSLog(@"First run!");
[prefs setBool:YES forKey:@"notFirstRun"];
VGLogInViewController *login = [[VGLogInViewController alloc] initWithNibName:@"VGLogInViewController" bundle:nil];
[self presentModalViewController:login animated:YES];
[login release];
}
}
The log is showed at first launch but the view is not presented and i can't really figure out why
So can anyone tell me or help me with this, that would be lovely