I've run into a sort of roadblock with my iPad app. I apparently made some unrecoverable change to my code recently and now it will only launch with a black screen. It displays the LoadingImage for a split second and goes right to black.
In an effort to streamline what sort of problem I'm looking for, I'd like some advice on where should I start looking? I've done my best so far to check and recheck everything I can think of already, so I'm ready to start the search over with some guidance. More specifically, what are some of the most common reasons that your code will just result in a black screen, without running any code at all. Would it be an InterfaceBuilder issue, an Xcode .h issue, a .m issue with my methods or what? I've sort of accidentally solved the issue a few times in the past, but am struggling to find the source this time. I've added NSLog calls throughout my code to help narrow down the problem (in every .m file actually) and none of them print to the log at all.
Facts:
- I'm using the latest Xcode and iOS
SDK (for iPad, 3.2).
- It does it in both the simulator and my actual iPad.
- My iPad is not, and hasn't ever
been Jailbroken.
- My app is actually really simple, it's just a single split-view with a detail view and a custom root view which has a resized table in it.
Any help anyone can provide would really save me a lot of whining, mopeyness and crying. heh
Thanks.
Additional Requested Code:
viewDidLoad from MasterView.m
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"Master: This self: %@", self);
self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
self.arrMenuOptions = [[NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"MainMenuOptions" ofType:@"plist"]] retain];
}
viewDidLoad from DetailView.m
- (void)viewDidLoad {
/// Initialize the preset things.
NSLog(@"Detail: This self: %@", self);
eleDetailToolbar.barStyle = UIBarStyleBlack;
eleWebView.opaque = NO;
eleWebView.backgroundColor = [UIColor clearColor];
eleWebView.delegate = self;
[super viewDidLoad];
}
AppDelegate excerpt
@implementation AssistantAppDelegate
@synthesize window, splitViewController;//, detailViewController, masterViewController;
//rootViewController, eleMasterNavigationItem
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSLog(@"AppDelegate: This self: %@", self);
// Override point for customization after app launch
// Add the split view controller's view to the window and display.
[window addSubview:splitViewController.view];
[window makeKeyAndVisible];
return YES;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…