| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- Archive
- Code
- 웹뷰
- MacOS
- Git
- mac
- FLUTTER
- Session
- geofencing
- Firebase
- IOS
- 한글
- Realm
- darkmode
- SwiftUI
- 맥
- Xcode
- iOS16
- 이미지
- github
- rxswift
- appstore
- error
- Swift
- 개발자
- shorebird
- Apple
- UIButton
- JPA
- window
- 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..