I Show a view using presentModalViewController
. and from this UIView
I want to push a UIView
using UINavigationController
.
I tried below code for this
[self.parentViewController.navigationController
pushViewController:objViewFullScreen
animated:YES];
But it did not works for me. so please can any one suggest how I push a view from ModelViewController
.
Thanks
First you have to present your modal view controller inside a navigation controller:
MyViewController *vc = [[MyViewController alloc] initWithNibName:@"MyNib" bundle:nil];
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentModalViewController:nc animated:YES];
[vc release];
[nc release];
Then inside MyViewController
you can do:
OtherViewController *vc = [[OtherViewController alloc] initWithNibName:@"MyOtherNib" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
[vc release];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With