Show/Hide TabBarController in iphone

后端 未结 4 614
别跟我提以往
别跟我提以往 2020-12-11 08:01

i am making an application in iphone in which i have 4 tabbars & in one of its tab i have 4 views in 2nd view it needs to hide the tab bar. I am able to hide the tab bar

4条回答
  •  -上瘾入骨i
    2020-12-11 08:56

    I had the same issue to show or hide tab bar controller with UITableViewController customized class. Somehow, by using the following codes, does not work to hide tab bar controller:

    - (void) viewDidLoad {
         self.hidesBottomBarWhenPushed = YES;
    
    }
    

    In the case of storyboard with segue, initWithStyle: method does not get called.

    Instead, I have to overwrite the property to make it work:

    - (BOOL) hidesBottomBarWhenPushed {
      return YES;
    }
    

    My case is for iOS 5.1 with storyboard and segue to push to the next view (where I want to hide tab bar controller).

提交回复
热议问题