0

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.

enter image description here enter image description here

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

and after it the appropriate tab must be programmatically selected
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?
.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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.