简体   繁体   中英

XIB loads in iOS 4 but doesn't load in iOS 5

I created an app in Xcode 4.1 and now i upgraded it to 4.2 so i could use the iPhone 5 simulator. I have an app that uses a tab bar to loads 3 views. They load correctly in iPhone 4 but in iPhone 5 simulator that doesn´t happen. I´m able to see my xib (with no content) that i load initially, but there are no tabs to choose from.

Apple made some changes in the projects in Xcode 4.2. Now they have storyboards which i don´t have because i created the app in Xcode 4.1. Anyone knows a work-around this?

The only code i think it may be usefull..

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{        
    [window addSubview:montraViewController.view];
    [self.window makeKeyAndVisible];
    return YES;
}

I was loading the view in viewDidAppear, that method was triggered when the view appeared in iOS 4 but in iOS 5 that didn´t happen. So i changed my "load controls" to the method viewDidLoad and they loaded correctly. Don´t take this has a bug, because it´s more probable to be bad programing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM