Hiding a UINavigationController's UIToolbar during viewWillDisappear:

后端 未结 11 1828

I\'ve got an iPhone application with a UITableView menu. When a row in the table is selected, the appropriate view controller is pushed onto the application\'s

11条回答
  •  长情又很酷
    2021-02-03 21:46

    For the UIViewController that does not need a toolbar when pushed you can consider using either

    Implementing the hidesBottomBarWhenPushed method for that UIViewController:

    // method to be added to the UIViewController that has no toolbar
    - (BOOL) hidesBottomBarWhenPushed {
        return YES;
    }
    

    Or prior to pushing in the UIViewController, set the value of hidesBottomBarWhenPushed:

    viewControllerWithNoToolBar.hidesBottomBarWhenPushed = YES
    [self.navigationController pushViewController:viewControllerWithNoToolBar animated:YES];
    

提交回复
热议问题