How to Hide Tab Bar Controller?

后端 未结 10 1686
猫巷女王i
猫巷女王i 2020-12-05 00:43

How to Hide Tab Bar Controller ? I want to hide the Tab Bar controller with double tap on UIImageView.

10条回答
  •  死守一世寂寞
    2020-12-05 01:04

    Try this code:

    [self.tabBarController.tabBar setHidden:YES];
    

    where tabbarcontroller is needed to be defined...

    EDIT

    AppDelegateFileName *appDelegate = (AppDelegateFileName *) [[UIApplication sharedApplication] delegate];
    [appDelegate.tabbarController.tabBar setHidden:YES];
    

    before doing this make sure that you create a @property declaration of tabbarController in appDelegate .h file.

提交回复
热议问题