Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- Realm
- 웹뷰
- JPA
- Archive
- FLUTTER
- iOS16
- IOS
- rxswift
- Notification
- mac
- github
- Git
- error
- SwiftUI
- Xcode
- appstore
- 한글
- Swift
- MacOS
- Code
- Session
- UIButton
- darkmode
- Firebase
- window
- view
- Apple
- geofencing
- stack
- 개발자
Archives
- Today
- Total
EEYatHo 앱 깎는 이야기
Swift ) UIColor로 UIImage만들기, DynamicUIImage만들기 - EEYatHo iOS 본문
반응형
UIColor -> UIImage
UIGraphicsBeginImageContext(CGSize(width: 1, height: 1))
UIGraphicsGetCurrentContext()!.setFillColor(uicolor.cgColor)
UIGraphicsGetCurrentContext()!.fill(CGRect(x: 0, y: 0, width: 1, height: 1))
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
UIImage + UIImage -> DynamicUIImage
( 다크모드, 라이트모드에 따라 런타임에 바뀌는 Image )
lightImage?.imageAsset?.register(darkImage ?? UIImage(), with: .init(userInterfaceStyle: .dark))
'iOS, Swift' 카테고리의 다른 글
Swift ) Request image/png 보내기 - EEYatHo iOS (0) | 2021.12.10 |
---|---|
Swift ) Dynamic Color, CGColor - EEYatHo iOS (0) | 2021.12.06 |
Swift ) UIImagePickerController 권한 필요없음 - EEYatHo iOS (0) | 2021.12.03 |
Swift ) 한글 스캔 OCR 시도한 것들 정리 - EEYatHo iOS (0) | 2021.11.30 |
Swift ) lottie keyNotFound error - EEYatHo iOS (0) | 2021.11.30 |
Comments