适配iPhonex的头部安全区域
Masonry 的适配安全区域
__weak typeof(self)weakself = self;
[backview mas_makeConstraints:^(MASConstraintMaker *make) {
if (@available(iOS 11.0,*)) {
make.top.equalTo(weakself.view.mas_safeAreaLayoutGuideTop);
}else{
make.top.equalTo(weakself.view.mas_top).width.offset(64);
}
make.left.right.equalTo(weakself.view);
make.height.equalTo(weakself.view.mas_height);
}];
后续还有适配的最新文章期待你们的关注