Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting black screen when loading navigation controller
    text
    copied!<p>The following code below is attempting to implement a method where my navigation controller launches to on e of two different views. The problem is that I keep getting a black screen whenever my application launches. </p> <pre><code>#import "SugarCRMReleaseOneAppDelegate.h" #import "SettingsViewController.h" #import "ModuleViewController.h" @implementation SugarCRMReleaseOneAppDelegate @synthesize window; @synthesize navigationController; #pragma mark - #pragma mark Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch NSString *a2 = [[NSString alloc] init]; a2 = [[NSUserDefaults standardUserDefaults] objectForKey:@"savedUsername"]; NSString *b2 = [[NSString alloc] init]; b2 = [[NSUserDefaults standardUserDefaults] objectForKey:@"savedPassword"]; [window makeKeyAndVisible]; if(a2 == nil &amp;&amp; b2 == nil) { SettingsViewController *viewController1 = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil]; [navigationController initWithRootViewController:viewController1]; [window addSubview:[navigationController view]]; [viewController1 release]; } else { ModuleViewController *viewController2 = [[ModuleViewController alloc] initWithNibName:@"ModuleViewController" bundle:nil]; [navigationController initWithRootViewController:viewController2]; [window addSubview:[navigationController view]]; [viewController2 release]; } [UIApplication sharedApplication].idleTimerDisabled=YES; return YES; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload