일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Protocol
- map
- combine
- clean architecture
- swiftUI
- uitableview
- Refactoring
- 클린 코드
- 스위프트
- 리펙토링
- HIG
- collectionview
- 리펙터링
- UICollectionView
- swift documentation
- ios
- Clean Code
- Xcode
- MVVM
- SWIFT
- Human interface guide
- ribs
- RxCocoa
- 리팩토링
- UITextView
- tableView
- 애니메이션
- Observable
- rxswift
- uiscrollview
- Today
- Total
목록dynamic (2)
김종권의 iOS 앱 개발 알아가기
MyDynamicView의 내부 컨텐츠(text)가 변할때 마다 컨텐츠를 감싸고 있는 view도 동시에 조정 class ViewController: UIViewController { lazy var myView: MyDynamicView = { let view = MyDynamicView() view.text = "123" return view }() override func viewDidLoad() { super.viewDidLoad() view.addSubview(myView) myView.center = view.center DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) { self.myView.text = "1" self.myView.center ..
상황 내부 크기가 동적으로 증가하는 경우 (label.text와 같은 경우), superView의 width를 동적으로 증가하여 내부 레이아웃을 유지할 수 있는 방법 값에 따라 크기가 동적으로 늘어나는 - 예시) UILabel let temporaryLabel = UILabel() temporaryLabel.font = UIFont.systemFont(ofSize: 12) temporaryLabel.text = "sampleDataString" print(temporaryLabel.intrinsicContentSize) // (101.0, 14.5) temporaryLabel.text = "sampleDataLongString ---- long ----" print(temporaryLabel.intrin..