일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- UICollectionView
- Human interface guide
- 애니메이션
- rxswift
- tableView
- Clean Code
- 스위프트
- collectionview
- 리펙토링
- RxCocoa
- ribs
- uitableview
- MVVM
- uiscrollview
- HIG
- UITextView
- combine
- Refactoring
- 클린 코드
- SWIFT
- ios
- 리펙터링
- map
- Protocol
- swiftUI
- swift documentation
- Xcode
- 리팩토링
- clean architecture
- Observable
- Today
- Total
목록UIGraphicsBeginImageContext (3)
김종권의 iOS 앱 개발 알아가기
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bYux5a/btrcNLXIun0/sOKgrKyyAiAssy8KU2tLW1/img.png)
CGAffineTransform 수학적인Affine("아핀") 변환의 의미: 점 사이의 상대적 거리 유지, 평행선을 보존하는 변환 translateBy(x:y:): Coordinate를 변경 scaleBy(x:y:): 확대 or 축소 rotate(by:): 회전 code enum AffineType { case translate case scale case rotate } func affineTransfrom(_ type: AffineType) { switch type { case .translate: rectButton.transform = .init(translationX: 50, y: 1.0) rectButton.setTitle("(translationX:50, y:1.0)", for: .norm..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/BABme/btq09jyUFfA/EBi4QfkEnQyZhlkV7DsVf1/img.png)
UIGrahpicsBeginImageContext란 bitmap image context를 생성하는 함수: 그림을 그려서 UIImage로 저장하는 것 context란? 코어 이미지의 모든 프로세싱은 CIContext내에서 수행: 렌더링 과정과 렌더링에 필요한 리소스를 더 정밀하게 컨트롤 할수 있게 해주는 객체 iOS 4.0 이전부터 지원했던 함수이며 scale = 1.0으로 bitmap image context를 만들어 주는것 (retina 디스플레이에서 선명하지 않을 수 있는 단점) UIGraphicsBeginImageContextWithOptions란 iOS 4.0+ 지원하는 함수이며 scale 값을 지정할 수 있어서 retina 디스플레이에 장점 인수 - size: bitmap context 사이즈..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/CXUR3/btq039h7B31/2KPRkqPLNgH6AMtVZ1p281/img.png)
CAGradientLayer이란? layer에 색 그라데이션을 입히는데 사용되는 객체 주로 UIView나 UILabel의 text에 그라데이션을 입히는데 사용 CAGradientLayer 사용 방법 객체 생성 후 frame 설정: frame은 적용될 view의 bounds로 설정 let gradientLayer = CAGradientLayer() gradientLayer.frame = myView.bounds 그라데이션에 들어갈 색상 추가(처음 ~ 마지막 순서대로 기입): 타입은 [CGColor] 타입 gradientLayer.colors = [UIColor.orange.cgColor, UIColor.red.cgColor] gradientLayer의 속성을 모두 지정하였으므로 (적용될뷰.layer.add..