iOS11 push控制器tabbar上移问题

解决方法ide

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated方法

{im

    // 若是有大于控制器tab

    if (self.childViewControllers.count >= 1) {animate

 

        viewController.hidesBottomBarWhenPushed = YES;view

    }vi

    [super pushViewController:viewController animated:animated];co

    

    // 修正push控制器tabbar上移问题push

    if (@available(iOS 11.0, *)){void

        // 修改tabBra的frame

        CGRect frame = self.tabBarController.tabBar.frame;

        frame.origin.y = [UIScreen mainScreen].bounds.size.height - frame.size.height;

        self.tabBarController.tabBar.frame = frame;

    }

}

相关文章
相关标签/搜索