Minitour / AZTabBarController

A custom tab bar controller for iOS written in Swift 4.2
MIT License
348 stars 65 forks source link

switching tabs programmatically #16

Closed raphaels17 closed 7 years ago

raphaels17 commented 7 years ago

Hi

is there any equivalent of self.tabBarController.selectedIndex = 1 to swith the tab bar programmatically ?

Minitour commented 7 years ago

Hi @raphaels17 Yes there is:

tabController.setIndex(2) //animated = true by default
//or
tabController.setIndex(2, animated: false)
raphaels17 commented 7 years ago

Thanks :-)