I am changing my app to use UITabBarController
instead of UINavigationViewController
. I replaced controllers accordingly and app launches with tabs successfully. Later in the code I came across some difficulties using segues where lines like
[self performSegueWithIdentifier:@"ImageViewController" sender:self];
won't work producing error
"Push segues can only be used when the source controller is managed by an instance of UINavigationController"
When I embedded UINavigationController
into the initial FirstViewController
, line above worked fine. I need that line to switch between views and pass some data to another view controller.
The problem is that using segue identifier to go to SecondViewController
hides TabBar navigation (unless I wrap SecondViewController
in UINavigationController
again and so on). That is not the solution.
Question: How to use UITabBarController
and still take advantage of segues while keeping tab navigation visible?