Hi all,
I am setting up a View created in a NIB file, but I can't get it to display. I must be missing something. Here's my setup: I have a NIB file with just the view in it (and all the NIB's subviews or controls). File's owner for the NIB is set to a custom UIViewController subclass. In Interface Builder, the view is connected to File Owner's view connector (thereby binding it to "self.view" within the class). The app begins with another view and a UINavigationController, and an instance of the second view is pushed into the stack in the "didFinishLaunchingWithOptions" message, like so:
When I run it, the second view is successfully displayed (my navigation controller animates, and the first view scrolls out of sight), but it is blank! What could I possibly be missing, especially considering that I have another project set up exactly the same way, and it works?
Thanks for any info.
I am setting up a View created in a NIB file, but I can't get it to display. I must be missing something. Here's my setup: I have a NIB file with just the view in it (and all the NIB's subviews or controls). File's owner for the NIB is set to a custom UIViewController subclass. In Interface Builder, the view is connected to File Owner's view connector (thereby binding it to "self.view" within the class). The app begins with another view and a UINavigationController, and an instance of the second view is pushed into the stack in the "didFinishLaunchingWithOptions" message, like so:
Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
//self.window.rootViewController = self.viewController;
self.window.rootViewController = navBar;
SecondViewController *second = [[SecondViewController alloc] init];
second.view = [[UIView alloc] init];
[navBar pushViewController:second animated:YES];
[self.window makeKeyAndVisible];
return YES;
}
When I run it, the second view is successfully displayed (my navigation controller animates, and the first view scrolls out of sight), but it is blank! What could I possibly be missing, especially considering that I have another project set up exactly the same way, and it works?
Thanks for any info.