0

iPad 11 英寸

(lldb) po UIApplication.shared.windows[0].layoutMargins
▿ UIEdgeInsets
  - top : 32.0
  - left : 8.0
  - bottom : 28.0
  - right : 8.0

iPad 10.5 英寸

(lldb) po UIApplication.shared.windows[0].layoutMargins
▿ UIEdgeInsets
  - top : 28.0
  - left : 8.0
  - bottom : 8.0
  - right : 8.0

iPhone 8 加号

(lldb) po UIApplication.shared.windows[0].layoutMargins
▿ UIEdgeInsets
  - top : 8.0
  - left : 8.0
  - bottom : 8.0
  - right : 8.0

由于圆角,新款 iPad 11 英寸机型的上边距比 10.5 英寸机型更大,这是有道理的。但是为什么 iPad 10.5 英寸机型的上边距不是 8.0 呢?iPhone 在所有边缘都有一致的边距,但......

任何想法?

4

1 回答 1

0

也许是因为 iPad 启用了状态栏。启用状态栏时,我在 10.5 英寸 iPad 上得到你的结果,禁用状态栏时我得到所有 8s。

我想弄清楚的是为什么在禁用状态栏的 iPad 11 英寸上,上边距是 8 而不是像底部那样的 28。

于 2018-11-09T19:11:08.793 回答