티스토리 뷰
앱을 만들다 보면, 생각보다 아이폰의 화면 사이즈가 제각각이라는 생각을 멈출 수가 없더군여?
(짜장면으로 통일 하라구,,,)
그래서 찾아보니, 생각보다 사이즈가 간단하지는 않았어여 ㅎㅎ
나같은 머리로는 이해모대,,,
그래도 정리를 해보려는 노력의 노력을 해볼게여
일단 Point와 pixel을 알아야 해요
Point(pt)
- 1인치를 72로 나눈 값 : 0.35146mm
우리가 앱을 만들 때 하는 제약값들은 모두 point가 기준
Pixel(px)
- 모니터의 해상도를 나타내는 단위
동그란 점도 엄청나게 확대를 해보면 아래처럼 점(픽셀)으로 이루어져있음
아주 예전에는 1point = 1pixel이었다고 함니당. (MAC 기준)
그런데 애플에서 레티나 디스플레이를 도입하면서 1point = 1pixel 공식이 깨지게 되었어요.
1pt 안에 더 많은 픽셀이 들어가게 된 거죠! 그만큼 더 선명해지고!!
예를들어 아래 큰 네모가 1포인트라고 가정했을 때,
그 안에 더 많은 픽셀이 들어갈수록 더 선명해보이는 것처럼 말이죠!
근데, 어떻게 모든 아이폰의 pixel를 생각해서 화면을 구성하나여! 넘모 불가능한 것,,,
그래서인지 앱을 만들 때 모든 제약은 pt 기준이며, 디스플레이는 알아서 px로 구현이 돼요
참말로 다행인 것,,,
아래는 아이폰별 points, pixel, scale factor니, 참고 부탁링!
그리고 저만 궁금했을 수도 있지만, xcode의 main.storyboard에서 화면에 나오는 아이폰 클래스를 설정할 수 있는 부분이 있거든여?
저기 아래 View as 부분이요! (저는 아직 바꿔서 사용해보진 않았지만)
거기 보면 모든 아이폰 모델이 있는 건 아니란 말이져?
예를들어 아이폰 6만 있고, 7과 8이 없어여!
그 이유는 위에 표를 보면 6, 7, 8은 같은 포인트 사이즈를 갖고 있기 때문에 6만 선택해도 7, 8에도 모두 적용되기 때문이었어여!!
오늘도 잘못된 점 있으면 알려주십셔 슨배님덜!!
https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html#//apple_ref/doc/uid/TP40013599-CH108-SW6
Displays
Displays The display is a key part of the great user experience on iOS devices. Users interact with the display surface, and see the results after an app reacts to these touches and updates the displayed image. Apple continues to improve the display hardwa
developer.apple.com
https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions
The Ultimate Guide To iPhone Resolutions
The email address you entered is not valid. The trial is limited to 7 days. Only the days when you actually use the plugin are counted. Not downloading automatically? Click here to download.
www.paintcodeapp.com
Image Size and Resolution - Icons and Images - iOS - Human Interface Guidelines - Apple Developer
Image Size and Resolution The coordinate system iOS uses to place content onscreen is based on measurements in points, which map to pixels in the display. A standard-resolution display has a 1:1 pixel density (or @1x), where one pixel is equal to one point
developer.apple.com
MAC 에서의 포인트(pt)와 픽셀(px)의 관계!
안녕하세요 :) Zedd입니다. 오늘은 MAC에서의 포인트와 픽셀의 관계에 대해 한번 찾아보게 되었어요. 포인트와 픽셀을 잘 알아놓으시면, 를 읽으실 때 도움이 되실거에요 :) 시작할게요! 먼저, MAC
zeddios.tistory.com
'알아두면 유용할 것' 카테고리의 다른 글
iOS앱 flutter로 다시 만들기 (0) | 2023.08.21 |
---|---|
아카이빙 할 때, 갑자기 swiftRealm 오류 (0) | 2022.11.03 |
xcode 프로젝트에서 갑자기 git 사라졌을 때 (0) | 2022.11.03 |
bitmap과 vector 뭔데!? (0) | 2022.01.06 |
마크다운 사용법 (0) | 2021.11.26 |
- Total
- Today
- Yesterday