I want to load a UIView, first time my app loads. But I can't make it happen.
Here's my applicationdidFinishLaunching method:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if(![[NSUserDefaults standardUserDefaults] boolForKey:@"AlreadyRan"] ) {
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"AlreadyRan"];
// proceed to do what you wish to only on the first launch
NarrativeView *narView = [[NarrativeView alloc] initWithNibName:@"NarrativeView" bundle:nil];
[window addSubview:narView.view];
[window makeKeyAndVisible];
[narView release];
} else
{
// Override point for customization after application launch.
[window addSubview:rootController.view];
[window makeKeyAndVisible];
}
return YES;
}
Can some one help me here?