首页 > 移动平台 > 详细

iOS11 push控制器tabbar上移问题

时间:2017-10-10 12:53:00      阅读:648      评论:0      收藏:0      [点我收藏+]

解决方法

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

{

    // 如果有大于控制器

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

 

        viewController.hidesBottomBarWhenPushed = YES;

    }

    [super pushViewController:viewController animated:animated];

    

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

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

        // 修改tabBra的frame

        CGRect frame = self.tabBarController.tabBar.frame;

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

        self.tabBarController.tabBar.frame = frame;

    }

}

iOS11 push控制器tabbar上移问题

原文:http://www.cnblogs.com/yang-shuai/p/7644530.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!