美文网首页
iOS适配在热点模式下,tabbar下移问题

iOS适配在热点模式下,tabbar下移问题

作者: geekAppke | 来源:发表于2018-07-03 17:07 被阅读65次
- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    if (!IS_IPHONEX) {
        UIView *containView = [self.rootView viewWithTag:kContainViewTag];
        [UIView animateWithDuration:0.25
                         animations:^{
                             if (CGRectGetHeight([[UIApplication sharedApplication] statusBarFrame]) > 20) {
                                 self.rootView.height = kScreenHeight - 20;
                                 containView.height = kScreenHeight - _rootView.tab_dock.frame.size.height - 20;
                             } else {
                                 self.rootView.height = kScreenHeight;
                                 containView.height = kScreenHeight - _rootView.tab_dock.frame.size.height;
                             }
                         }];
    }
}
  • #define IS_IPHONEX (kScreenHeight == 812.0)
  • iPhoneX 不用适配

相关文章

网友评论

      本文标题:iOS适配在热点模式下,tabbar下移问题

      本文链接:https://www.haomeiwen.com/subject/wpljuftx.html