My Main Window will not change even though I change it?
Hey! Have a problem that is driving me crazy! My Main Window will not change when a make changes in interface builder in xcode 4, I have played around for over 2 hours trying to make changes but when a build it does not change. When a c开发者_如何学JAVAhange something in the code it works just fine. The thing I'm trying to add to the main window is a new tab in the tabbar. Please help me !
UPDATE:
My applictiondidfinfishwithoptions looks like this.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[window addSubview:navigationController.view];
[window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
return YES;
}
Make sure that you are adding the tab to whatever view is assigned to the main window's root view controller property. If you drag and item into the window itself it won't work. To complicate matters, some of Apple's templates configure the root view controller in the application delegate's application:didFinishLaunchingWithOptions:
method, so check there to see what is being assigned.
UPDATE:
You should add one view to the window and add the other views as subviews.
精彩评论