I have a modal UIViewController
over the UITabBarViewcontroller
and i want to dismiss it, then change the selected item of my tab bar.
I'm trying to accomplish it by setting the selectedIndex
inside dismiss' completion:
self.dismiss(animated: true, completion: {
self.tabBarController?.selectedIndex = 2
})
I apologize if this is a newbie question, i just couldn't find the solution to this anywhere. Thanks in advance for every answer, clue or old similar questions that you send me :)