search

Home  >  Q&A  >  body text

objective-c - tabbar toolbar hidden

1. There is a tabbar at the bottom of my group purchase demo

2. When I click on a group purchase row, the details page pops up. The requirement is to hide the tabbar underneath on the details page
3. The hidden code is
self.hidesBottomBarWhenPushed = YES

Problem: I don’t know when to add this code. When you click the navigation bar to return from the details page, the tabbar

needs to be displayed.

Note: Using present to push can automatically hide the tabbar. Here I want to know how to use push to do it.

高洛峰高洛峰2812 days ago478

reply all(1)I'll reply

  • 迷茫

    迷茫2017-05-02 09:25:35

    Do it when you call pushViewController. As follows:

    - (void)goToDetailPage {
        UIViewController *detailViewController = [[UIViewController alloc] init];
        detailViewController.hidesBottomBarWhenPushed = YES;
        [self.navigationController pushViewController:detailViewController animated:YES];
    }

    reply
    0
  • Cancelreply