일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Firebase
- darkmode
- window
- Swift
- MacOS
- Session
- JPA
- 개발자
- 한글
- mac
- appstore
- FLUTTER
- rxswift
- UIButton
- IOS
- github
- 웹뷰
- error
- Git
- geofencing
- Archive
- Realm
- Notification
- Code
- SwiftUI
- Xcode
- 이미지
- shorebird
- Apple
- iOS16
- Today
- Total
목록Dynamic (2)
EEYatHo 앱 깎는 이야기

Dynamic Image 런타임에서 다크모드, 라이트모드 변경에 대응하는 다이나믹 이미지 ( Dynamic Image ) 가 있다. ( Dynamic Color 처럼 ) 다이나믹 이미지는 AssetCatalog 나 Code 로 생성할 수 있다. 1. AssetCatalog 로 Dynamic Image 생성하기 UIImage(named: "MyImageName") 2. Code 로 Dynamic Color 생성하기 UIImage 에게 추가 작업 ( resize 등 ) 을 하게되면, 코드로 생성하는게 필요해진다. func dynamicImage(lightImage: UIImage, darkImage: UIImage) -> UIImage { let darkTC = UITraitCollection(traitsF..
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?.regis..