UI Guide
UI%20Guide
User Manual:
Open the PDF directly: View PDF .
Page Count: 22

UI Guide
Giftbot



iPhone X Resolution


iPhone Resolutions
https://goo.gl/vwbzQY


iOS Device Screen Geometry

Color Reproduction

Architecture of the views

Layered views

Coordinate system orientation

View Frame
View Frame 의 좌표는 상위뷰를 기준으로 결정

Frame and Bounds
상위 뷰로부터 얼마만큼 떨어져있는지
이미지 스스로가 기준값으로

Frame and Bounds
frame의 시작점
bounds의 시작점


Frame

Bounds

UIViewContentMode
public enum UIViewContentMode : Int {
case scaleToFill
case scaleAspectFit
case scaleAspectFill
case redraw
case center
case top
case bottom
case left
case right
case topLeft
case topRight
case bottomLeft
case bottomRight
}
Scailing
Redrawing
Positioning

Scaling

Redrawing
- View 의 크기가 변경될 때마다 setNeedsDisplay() 메서드를 호출하여 연관 컨텐츠를 !
항상 다시 그리게 하는 것!
- draw(_:) 메서드에 별도의 그리기 작업이 들어가고 크기에 영향을 받을 경우 설정!
- 크기 변경시마다 매번 다시 그려야 하므로 성능상으로는 좋지 않은 영향

Positioning