Questions about the tab bar hiding and displaying

Source: Internet
Author: User

The problem with developing a project is this:

A label controller wraps two navigation controllers and two navigation controllers are packaged with a view controller (mostly UITableView)

When you click on the cell to push to another interface, you need to hide the tab bar (because the tab bar is covered by the following input box), back to show the tab bar (this is no problem)

When you click another tab on the tab bar and then point it back, the tab bar will be hidden (I wrote the error code, not described)

Correct thinking: (-_-| | It should be right to use this to make it.

The first thing you need to know about this property is: (Hide when push is not, default is NO)

Hidesbottombarwhenpushed

Second, understand the life cycle of Uiviewcontrllor:

-(void) Viewwillappear: (BOOL) animated {    [Super viewwillappear:animated];} -(void) Viewwilldisappear: (BOOL) animated {    [Super viewwilldisappear:animated];} -(void) Viewdiddisappear: (BOOL) animated{    [Super viewdiddisappear:animated];//    self.hidesbottombarwhenpushed = NO;    } -(void) Viewdidappear: (BOOL) animated{    [Super viewdidappear:animated];//    self.hidesbottombarwhenpushed = YES;    }

See here, you may know my previous mistakes, I will show and hide write in view will (show, disappear inside)

Already shown: (Push hidden)-(push)-Hide

Has disappeared: (push not hidden)-Avoid the tab bar being hidden when clicked back on the tab bar

Well, it's been tested, and there's no difference between what's gone and what's going to disappear (-_-| | )

self.hidesbottombarwhenpushed = YES;

Can't write in will show inside Oh, tab bar switch over there will be a problem,


Questions about the tab bar hiding and displaying

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.