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

- (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下移问题)