Please check the attached images. When the user touches the profile tab on the first image, then the tabbar should be like the second tab. I already searched through Github and Stackoverflow, but I can't find how to implement this tabbar.
1 Answer
You will want to look at UITabBarController and .setViewControllers.
The idea would be that when "Profile" is tapped, your custom TabBarController would use .setViewControllers to change the new "set" of controllers that you want displayed. Tapping the "Back" button would do the reverse.
3 Comments
Dmitry A.
and after it the appropriate tab must be programmatically selected
Marcelo P.
thanks for your reply. I wanna set some animations. for example, if I touch the profile tab on the first image, the tab bar slides left to show the second image. have you got any idea?
DonMag
.setViewControllers() has an animated: BOOL option: "If YES, the tab bar items for the view controllers are animated into position. If NO, changes to the tab bar items are reflected immediately." Best bet is to try it out and see what you get. If you don't like the default animation, you may have to write your own.
