Trouble setting FIrst view controller which will appear on App Startup
- by Matte.Car
I'm setting setting FIrst view controller which will appear on my App Startup. It should appear an UIView first time as a tutorial and, from second time, another standard view.
In AppDelegate I wrote this:
#import "AppDelegate.h"
#import "TabBarController.h"
#import "TutorialController.h"
@implementation AppDelegate
TabBarController * viewControllerStandard; // standard view
TutorialController * viewControllerFirst; // tutorial view
@synthesize window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if ([@"1" isEqualToString:[[NSUserDefaults standardUserDefaults] objectForKey:@"Startup"]]) {
window.rootViewController = viewControllerStandard;
} else { window.rootViewController = viewControllerFirst; }
[window makeKeyAndVisible];
return YES;
}
It doesn't return any alert but, launching app, after splashscreen, it appear only a black screen. Without that codes everything works fine. What could be wrong? Thank you!