ADGP
ADGP

Reputation: 21

How to unwind from UITabBarController to custom view

I´ve a UITabBarController in the middle of a storyboard and I want that when I push back button on UITabBarController (TabBar) sends me to View02 directly.

My sequence is:

NavigationController->UIViewController01-> UIViewController02 -> UIViewController03 -> UITabBarController -> 3 TabBarViews

enter image description here Could you help me, please?

Thanks in advance,

Upvotes: 0

Views: 272

Answers (1)

Rafał Sroka
Rafał Sroka

Reputation: 40030

You have to create an unwind segue. First add a method in the view controller you want to unwind to:

- (IBAction)unwindToMyViewController:(UIStoryboardSegue *)unwindSegue
{

}

Then in a view controller you want unwind from drag from the button to the green exit icon and select your action.

enter image description here

Upvotes: 1

Related Questions