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 |
Tags
- Observable
- swift documentation
- RxCocoa
- tableView
- 애니메이션
- SWIFT
- collectionview
- 리펙토링
- UITextView
- 스위프트
- ios
- Human interface guide
- Protocol
- clean architecture
- MVVM
- 클린 코드
- Xcode
- 리펙터링
- uitableview
- uiscrollview
- UICollectionView
- map
- Refactoring
- ribs
- Clean Code
- 리팩토링
- rxswift
- swiftUI
- HIG
- combine
Archives
- Today
- Total
목록UILabel 크기를 텍스트에 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] intinsicContentSize, sizeToFit, sizeThatFits (UILabel 크기를 텍스트에 맞추는 방법)
UILabel의 이해 UILabel은 초기에 frame.size를 지정해주지 않으면 width, height가 0으로 세팅 text의 내용이 있더라도 0으로 존재 // 텍스트에 무엇이 존재하던지 frame.size 값은 0으로 초기화 class ViewController: UIViewController { lazy var titleLabel: UILabel = { let label = UILabel() label.textColor = .black label.text = "초기 텍스트" return label }() override func viewDidLoad() { super.viewDidLoad() titleLabel.center = view.center print(titleLabel.frame.si..
iOS 응용 (swift)
2021. 7. 30. 23:27