Kery
Kery

Reputation: 523

How to auto hide the tab bar when presenting other view

Is there anybody used the IM software called QQ (popular in China)? This software has an tab bar and it has 5 tabs. In each tab there is a navigation controller, like this:

main UI of QQ

In the second tab when tap any of the first three table view cell this tab's view will transit to an other view in normal way, that is the transition happen within the tab bar controller.

transition to other view in normal way

When tap any of the last three table view cell this tab's view will also transit to an other view but meanwhile the tab bar will transit together with the view controller too.

transition to other view with tab bar

This is very strange! According to the first situation we can guess that the navigation controller is the child of the tab bar controller, but according to the second situation the tab bar may be the child of navigation controller, right? Anybody knows how to implement this UI? Thank you in advance!

Upvotes: 1

Views: 270

Answers (2)

Kery
Kery

Reputation: 523

Thanks god! The answer is set the hidesBottomBarWhenPushed property of the view controller pushed into navigation controller stack to YES.

Upvotes: 1

user352891
user352891

Reputation: 1191

The tab bar in the screenshot doesn't have to be a tab bar, it could be a custom view on the view controller, I've used a similar approach when the tab bar needed to change drastically.

Upvotes: 0

Related Questions