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 |
Tags
- swift concurrency
- SwiftUI
- spritekit
- 백준
- Protocol
- 스위프트
- composable architecture
- 문법
- 웹
- 스유
- widgetkit
- 후기
- 컴퓨터그래픽스
- 멋쟁이사자처럼
- 1일1알골
- 위젯킷
- 네트워크
- 운영체제
- TCA
- 영남대
- cs
- dispatchqueue
- 멋사
- uikit
- 리액트
- 대외활동
- 알고리즘
- c++
- widget
- Swift
Archives
- Today
- Total
목록Then (1)
맛동산이
UIKit) Then을 사용해보자
Then은 오픈소스라이브러리로, UIkit의 인스턴스를 생성할때 좀더 깔끔하게 생성하기 위한 라이브러리다. 기존의 UIkit코드는 다음과 같이 보통 사용하게 되는데 let topLabel = UILabel() topLabel.text = "hi" topLabel.textColor = .red 혹은 let topLabel: UILabel() { let label = UILabel() label.text = "hi" label.textColor = .red return label }() 와 같은 방법으로 생성하게 된다. 이를 좀더 깔끔하게 사용할수 있도록 해주는것이 바로 이 then이다. let topLabel = UILabel.then { $0.text = "hi" $0.textColor = .red } ..
앱/Swift
2024. 1. 1. 21:26