iOS/코드조각
[iOS, Swift] 코드로 Custom Color 지정하기(UIColor Extension)
검은참깨두유vm
2022. 7. 6. 09:50
반응형
iOS 15.5, Xcode 13.31, Swift 5, UIKit 환경에서 진행했습니다.
extension UIColor {
static let custom_clearBlue = UIColor(red: 38/255, green: 153/255, blue: 251/255, alpha: 1)
}
사용법
label.backgroundColor = UIColor.custom_clearBlue
반응형