Reputation: 5093
nc
with VC0
VC0
VC0
, I want to present a "VC1"
bottom-to-topVC0
, [self.nc presentViewController:VC1]
VC1
VC1
, I want to present VC2
right-to-leftVC1
, I tried [self.nc pushViewController:VC2]
How can I accomplish the above?
Upvotes: 1
Views: 53
Reputation: 9012
VC1 needs to be in its own UINavigationController. If you put a breakpoint at the point you try to call pushViewController:animated:
, you'll notice that the navigation controller property on VC1 is nil
.
When you present VC1 do this instead:
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:vc1];
[self.navigationController presentViewController:navigationController completion:nil];
You can then do your pushViewController:animated:
call.
Upvotes: 1