You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
default는 nil입니다. 만약 nil이 아니라면 컬러는 이미지 뷰에 첨부된 템플릿 이미지에 적용됩니다. 기본적으로 tintColor는 UIView가 가지고 있는 프로퍼티입니다. 상위가 되는 뷰의 tintColor를 변경하면 상속받는 하위 뷰에 차례대로 영향을 줄 수 있습니다.
Original Image vs Template Image
tintColor
UIImageView - Instance Property
뷰 계층에서 템플릿 이미지에 색조를 지정하는데 사용되는 컬러입니다.
default는 nil입니다. 만약 nil이 아니라면 컬러는 이미지 뷰에 첨부된 템플릿 이미지에 적용됩니다. 기본적으로 tintColor는 UIView가 가지고 있는 프로퍼티입니다. 상위가 되는 뷰의 tintColor를 변경하면 상속받는 하위 뷰에 차례대로 영향을 줄 수 있습니다.
UIImage.RenderingMode
이미지에 대해 가능한 렌더링 모드를 지정하는 상수입니다.
렌더링 모드는 UIKit이 색상 정보를 사용하여 이미지를 표시하는 방법을 제어합니다. 렌더링 모드의 디폴트는 automatic입니다.
Original Image
Template Image
Asset에서 Rendering Mode를 직접 변경하는 방법
정리
이미지의 색상을 임의의 값으로 변경하고 싶다면 Rendering Mode를 .alwaysTemplate으로 변경하고 tintColor를 조정하면 됩니다.
The text was updated successfully, but these errors were encountered: