

#Appdelete restore fail root code
Removing it would be best if using a NIB file as adding any other code will in effect override it. The SOLUTION was to either completely remove the loadView method from the implementation section, or to call the parent method by adding. There was nothing else inside this method, so in affect I was overriding the method (and doing nothing) WHILE using a nib file, which gave the error. The comment indicated to override loadView method if creating a view programmatically (and I'm paraphrasing), otherwise NOT to override loadView if using a nib.

After carefully reading the comments inside it, it became clear what the problem was. Xcode 4.3 appears to add by default the method -(void)loadView to the view controller implementation section. I created a single view template through Xcode and compared it to my code and FINALLY found the problem! create empty project, then create a UIViewController, and then Create a separate nib file).Īfter putting ALL the lines I used to, and ensuring I had the correct connections, I kept getting that error, and the nib file I was trying to load through the view controller (which was set as the rootController) never showed in the simulator. I began having this same issue right after upgrading to Xcode 4.3, and only when starting a project from scratch (i.e.

This will work only if sho's solution is implemented also. Self.tabBarController = init] autorelease] ViewController2 = bundle:nil] autorelease] ViewController1 = bundle:nil] autorelease]

UIViewController *viewController1, *viewController2 Self.window = initWithFrame: bounds]] autorelease] If (!window & !navigationController) and navigation controller not loaded from nib. If this is not the point, and if the tabBarController is still nil, you can always programmatically create your window and root controller.Īs a fallback I added the following code to my project - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions What was missing, was that somehow the Main Interface property in the summary tab of my application target got erased. In my case the solution was rather simple. I run into the same problem recently, when building a project with ios5 sdk.Īt first it was building and running properly, but after that the error appeared. If that doesn't work, try to set the starting settings in the nib file instead of in code - or if you want to do it in code, try moving the code to the tabBarController's active viewcontroller's appropriate method. In your case I suggest you check out the code in the tabBarController's active view controller (as it is probably a problem in that view controller). My problem specifically was caused by making a UIAlertView show. The solution was hence to move this code in the viewcontroller that was giving me trouble fromĪnd the error stopped appearing. It turns out that I was trying to change the display of a view before it actually came on screen. (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptionsĪt first I didn't really know where the error was coming from precisely so I narrowed it down and found out what went wrong. I had the same error when trying to change the first view controller that was loaded in
