美文网首页
iOS 13 UIPopoverPresentationCont

iOS 13 UIPopoverPresentationCont

作者: 熊gg | 来源:发表于2020-07-07 01:14 被阅读0次

UIPopoverPresentationController 中的箭头 arrow的frame包含在了vc.view中。导致以前正常的布局在iOS 13上错误显示。

so =》

更新布局

使用约束(Masonry)进行布局,就利用mas_safeAreaGuide相关属性即可.e.g.

// way 1

[self.bgView mas_makeConstraints:^(MASConstraintMaker*make){

make.edges.equalTo(self.view.mas_safeAreaLayoutGuide

);

}

];

// way 2

[self.bgView mas_makeConstraints:^(MASConstraintMaker*make){

make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop);

make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);

make.leading.equalTo(self.view.mas_safeAreaLayoutGuideLeading);

make.trailing.equalTo(self.view.mas_safeAreaLayoutGuideTrailing);

}];

还有就是delegate每次都要设置

相关文章

网友评论

      本文标题:iOS 13 UIPopoverPresentationCont

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