Hi everyone,
I am having an issue with a modal view that I am using. I have a view controller setup and initialised with a xib file like so:
I then present this as a modal dialogue like this:
To dismiss this modal view, from TransactionViewController I do this:
However, in my instance of TransactionViewController, navigationController is nil, so the view is not dismissed. I have copied this idea from Apple's NavBar sample where it works perfectly well. The only difference is that my view controller that invokes the modal view is within a UITabBarController.
I have no idea why the navigationController of my TransactionViewController instance is nil. If anyone could give me any pointers I would be most grateful.
I am having an issue with a modal view that I am using. I have a view controller setup and initialised with a xib file like so:
Code:
transactionViewController = [[TransactionViewController alloc] initWithNibName:@"TransactionView" bundle:nil];
I then present this as a modal dialogue like this:
Code:
[[self navigationController] pushViewController:transactionViewController animated:YES];
To dismiss this modal view, from TransactionViewController I do this:
Code:
[[self navigationController] dismissModalViewControllerAnimated:YES];
However, in my instance of TransactionViewController, navigationController is nil, so the view is not dismissed. I have copied this idea from Apple's NavBar sample where it works perfectly well. The only difference is that my view controller that invokes the modal view is within a UITabBarController.
I have no idea why the navigationController of my TransactionViewController instance is nil. If anyone could give me any pointers I would be most grateful.