A tab bar item shows a view controller with a modal segment.

I have a TabBarController with 5 TabBarItems (build with IB). So far, so good. But, for example, when I click on the second element, I want my second view controller to appear with a modal segment. I do not understand how to fix this with TabBarController ...

Can anybody help me?

+4
source share
1 answer

Would it help you if you subclassed the tab bar controller and, if necessary, implemented your own segue transitions?

Specify delegates UITabBarControllerDelegate in your subclass UITabBarControllerand implement the function

func tabBarController(tabBarController: UITabBarController, shouldSelectViewController viewController: UIViewController) -> Bool

to catch a choice.

, UIViewControllerAnimatedTransitioning, , , .

0

Source: https://habr.com/ru/post/1605866/


All Articles