I have a UITabBarController as my MainWindow.xib. I have 3 tab bar items on the tab bar. On the second tab bar item, i have placed a UIButton. When the user taps the button, i want to be able to switch to the first tab bar item and display the view loaded there. How would i do this programmatically?
Thanks
You can use
UITabBacController‘sselectedViewControllerproperty if you have a reference to the view controller you want to switch to, or you can useselectedIndexif your tabs have a static order and you know which index to switch to.