KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I ran into a situation that seems to suggest otherwise. In the following code snippet, if I remove the line: self.navigationController = nav, the root controller's view won't show up, suggesting to me that addSubview might not actually retain the view as otherwise suggested. Any idea? - (void)applicationDidFinishLaunching:(UIApplication *)application { self.testViewController = [[TestViewController alloc] initWithNibName:@"TestView" bundle: [NSBundle mainBundle]]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.testViewController]; self.navigationController = nav; //<-- if this line is removed, test view won't show up [window addSubview:nav.view]; [nav release]; }
Tags (comma-separated)
Save Edits
Cancel