最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

autolayout - Why is the bottom of the iOS safe area layout not aligned with the rounded corners in portrait mode? - Stack Overfl

programmeradmin3浏览0评论

Why is the bottom of the iOS safe area layout not aligned with the rounded corners in portrait mode, leaving a small clipped edge, while in landscape mode, it is fully aligned? Due to this clipped edge, when placing text at the bottom, part of it may be obscured. Is this behavior expected? How can this issue be resolved?

portrait mode

Block the text

Annotated angles

landscape mode

I suddenly noticed this issue in Xcode 16 and thought it was caused by the Xcode version. However, after switching back to Xcode 15, the same behavior still occurs.

Why is the bottom of the iOS safe area layout not aligned with the rounded corners in portrait mode, leaving a small clipped edge, while in landscape mode, it is fully aligned? Due to this clipped edge, when placing text at the bottom, part of it may be obscured. Is this behavior expected? How can this issue be resolved?

portrait mode

Block the text

Annotated angles

landscape mode

I suddenly noticed this issue in Xcode 16 and thought it was caused by the Xcode version. However, after switching back to Xcode 15, the same behavior still occurs.

Share Improve this question asked Mar 17 at 5:35 amliangsiramliangsir 93 bronze badges 1
  • the safe area also has leading and trailing constraints. align to those as well – Oscar Apeland Commented Mar 17 at 7:57
Add a comment  | 

1 Answer 1

Reset to default 0

The safe are layout guide does not account for the rounded corners of the device.

To avoid clipping views, constrain the view to the layout margins guide:

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论