I am trying to make a very simple example of a UINavigationController. Here is my code:
- (void)viewDidLoad {
[super viewDidLoad];
This next line works or at least doesn't explode.
navController = [[UINavigationController alloc] initWithRootViewController:self];
self.title = @"blah";
PageOneController *one = [[[PageOneController alloc]init] autorelease];
Example 1. THIS LINE IS NOTHING
[navController pushViewController:one animated:NO]
Example 2. THIS WORKS LINE (but, of course, there is no navigation controller)
[self.view addSubview:one.view];
}
Why can't I push instances of ViewController on navController and see a screen change?
Note: I understand that I can have my own concepts back, and I don’t need my view to refer to UINavigationController... or something like that.
source
share