Reputation: 343
The question is show in the picture. How can I back from viewcontroller C to A. Method popViewControllerAnimated doesn't work.
Upvotes: 0
Views: 49
Reputation: 3590
You have an issue in your controllers hierarchy. You shouldn't have an UINavigationController
between your UIViewController
A and C.
Since the UITabBarController
push the controller A embedded in an UINavigationController
, your navigation is already setup for this tab, no need to repush another one later.
So, to solve your issue, you should have that for the first tab: UITabBarViewController -> UINavigationController -> UIViewController A -> UIViewController C. This way, the popViewControllerAnimated
will work.
Upvotes: 2