常用代码

  1. 实现导航栏push时隐藏标签栏
    抽出一个导航控制器类复写push方法
    [objc] view plain copy
  • (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
    if (self.viewControllers.count > 0) {
    viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
    }

推荐阅读更多精彩内容