A
A
Anton Osipov2016-12-06 21:51:49
Swift
Anton Osipov, 2016-12-06 21:51:49

I have a ViewController containing a tabbar, how do I know which element is selected?

I have a ViewController containing a tabbar, how do I know which element is selected? the main ViewController contains a tabbar without a tabbarcontroller, how can I get the number of the selected tab? Is there any listener?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
briahas, 2016-12-15
@briahas

There is also a selecteditem variable
and a tabbar delegate method func tabBar(UITabBar, didSelect: UITabBarItem)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question