본문 바로가기

iOS

iOS) UIView.ContentMode

어라 Int네?

이미지를 뷰에 어떤 크기, 비율로 넣을 것인가? 정하는 옵션

 

 

scaleToFill = 0

뷰에 맞게 이미지 크기를 채운다.

scaleAspectFit = 1

뷰의 크기에 맞게 원본 이미지 비율에 맞게 채운다.

scaleAspectFill = 2

이미지 원본 크기에 맞게 그냥 넣는다 (짤리는 경우 발생)

redraw = 3 

뷰의 컨텐츠가 변경 될 때 다음 사이클이 오기전에  setNeedsDisplay() 호출해서 View업데이트 해!

(추후;;; 다시 정리;; )

 

나머지는...

 

이거 한방에 설명 끝;

 

https://developer.apple.com/documentation/uikit/uiview/contentmode

 

'iOS' 카테고리의 다른 글

iOS) UITextView  (0) 2020.04.23
iOS) UITextField  (0) 2020.04.22
iOS) UIImageView  (0) 2020.04.22
iOS) UIView  (0) 2020.04.21
iOS) Auto Layout 1  (0) 2020.04.17