Friday 27 October 2017

how switch to specific tab programmatically if click on button in UITabBarItem

I have a button in Viewcontroller in UITabBarItem, I want to switch to a specific tab

Just use this:
tabBarController?.selectedIndex = 1

No comments:

Post a Comment

Remove bottom line in navigation bar

navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default )          navigat...