I have a custom tab bar in my app. I am using a raised custom button for the middle of the tab bar. This custom middle button should change to a selected state after the user makes a button tap from the first tab.
The button’s action on the first tab is:
[self.tabBarController setSelectedIndex:1];
I am using my own Tabbar Controller class so I am able to draw the custom button in the middle. I have the button changing states when it is selected manually, but I need it to change states when the button tap occurs from the first tab and sets the selected index to the middle tabbar button.
Let me know if I can give more information. Thanks for putting up with a newb!
I solved this by casting self.tabBarController to my custom tabBarController:
Then to reference the button and set selected I simply did: