美文网首页
iOS 11及iphone X 适配笔记(持续更新)

iOS 11及iphone X 适配笔记(持续更新)

作者: kangyiii | 来源:发表于2018-03-15 16:25 被阅读0次

1.启动图添加1125x2436图片,否则上下都有黑边


无1125x2436启动图效果

2.状态栏增加24px,iphone X状态栏为44px。


3.Tabbar下方手机可操作区域为33px


可操作区域

4.自定义Tabbar时删除原有Tabbar,解决办法

-(void)viewWillLayoutSubviews
{
    [super viewWillLayoutSubviews];
    // 删除系统自动生成的UITabBarButton
    for (UIView *child in self.tabBar.subviews) {
        if ([child isKindOfClass:[UIControl class]]) {
            [child removeFromSuperview];
        }
    }
}

5.tabbleView头部多处出一部分高度,解决办法

_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;

6.后台定位


相关文章

网友评论

      本文标题:iOS 11及iphone X 适配笔记(持续更新)

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