본문 바로가기

Swift

<Swift> 아이폰 기기별 SafeArea

기기별로 테스트를 하다가 1point, 2point씩 어긋나는게 너무 눈에 걸려서 이참에 한번에 정리하려고 한다.

.ignoresSafeArea(.all)
.ignoresSafeArea(.container, edges: .bottom)

이런식으로 Safe Area를 ignore 하는데 기기별로 영역이 다르다.

아이폰 12, 13, 14만 다룰 예정이다. (사실 이것만 커버하기 때문에...)

좌우는 고려하지 않고, 상단과 하단만 고려한다.


아이폰 12

- iPhone 12 mini

- iPhone 12
- iPhone 12 Pro

- iPhone 12 Pro Max


아이폰 13

- iPhone 13 mini


- iPhone 13
- iPhone 13 Pro

- iPhone 13 Pro Max


아이폰 14

- iPhone 14
- iPhone 14 Plus


- iPhone 14 Pro

- iPhone 14 Pro Max


결과적으로,

iPhone 12 mini, iPhone 13 mini가 상단 50points,

iPhone 14 Pro, iPhone 14 Pro Max가 상단 59points,

위의 4개의 기종을 제외하고 나머지의 상단은 다 똑같다고 보면 될 것 같다.

 

하단은 전부 34points로 동일하다.


참고 사이트

- https://useyourloaf.com/blog/iphone-14-screen-sizes/

 

iPhone 14 Screen Sizes

The notch is being replaced by the dynamic island. Here's a recap of what's changed with the 2022 iPhone 14 screen sizes.

useyourloaf.com

- https://useyourloaf.com/blog/iphone-13-screen-sizes/

 

iPhone 13 Screen Sizes

The 2021 iPhone 13 release feels like an incremental update over the iPhone 12. Not much has changed but here's a recap of what you need to know to update your apps for the new devices.

useyourloaf.com

https://useyourloaf.com/blog/iphone-12-screen-sizes/

 

iPhone 12 Screen Sizes

Four new models with three new device sizes including a 5.4" mini. Here's what you need about the iPhone 12.

useyourloaf.com