No nib/IB, so I've inserted "myAppDelegate" in main and deleted the reference to main.xib in info.plist. Debug continues nicely through all five tab controllers; they seem to have gotten properly loaded into the nav controller. In fact, control passes out of the last "}" in applicationDidFinishLaunching. But there was no (visible) response back at [window addSubview:[tabBarController view]]; and [window makeKeyAndVisible]; statements, much less to the loadView within the first tab (program execution never gets there). The last line is, UIApp开发者_Python百科lication _performInitializationWithURL:sourceBundleID:]. I missed a step? I executed a step improperly?
Did you create an UIWindow
instance in applicationDidFinishLaunching:
?
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
Also, the line you call UIApplicationMain
should look like this:
int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"YourAppDelegate");
where YourAppDelegate is the name of your AppDelegate class.
精彩评论