티스토리 뷰
728x90
반응형
UIButton 코드로 짜기
let bookBtn = UIButton()
//title
bookBtn.setTitle("예매율순", for: .normal)
//title color
bookBtn.setTitleColor(.black, for: .normal)
//title fontsize
bookBtn.titleLabel?.font = UIFont.systemFont(ofSize: 12)
//imageview image
bookBtn.setImage(UIImage(systemName: "circle.fill"), for: .normal)
//imageview image size
bookBtn.setPreferredSymbolConfiguration(.init(pointSize: 3, weight: .regular, scale: .default), forImageIn: .normal)
//imageview image color
bookBtn.tintColor = .black
//UIButton insets
bookBtn.titleEdgeInsets = .init(top: .zero, left: 8, bottom: .zero, right: .zero)
//UIButton add action
bookBtn.addTarget(self, action: #selector(touchBookBtn), for: .touchUpInside)728x90
반응형
'iOS' 카테고리의 다른 글
| iOS) UICollectionView cell 왼쪽정렬 (0) | 2021.07.21 |
|---|---|
| iOS) delegate 에 여러개의 컬렉션뷰를 연결하기 (0) | 2021.07.21 |
| iOS) convert UIColor to String (0) | 2021.07.21 |
| iOS) Cell 꾹 눌러서 미리보기 만들기 (0) | 2021.07.21 |
| iOS) UINavigationBar 의 large title 색 설정 (0) | 2021.07.21 |
댓글
TAG
- configurable widget
- CloneCoding
- Algorithm
- RxCocoa
- APNS
- Firebase
- WWDC
- Objective-C
- UserDefaults
- 서버통신
- MOYA
- watchOS
- 2022 KAKAO TECH INTERNSHIP
- rxswift
- projectsetting
- SwiftUI
- Swift
- WWDC22
- containerBackground
- github
- urlsession
- IOS
- async/await
- WidgetKit
- Protocol
- Notification
- OpenSourceLibrary
- Widget
- YPImagePicker
- MVVM
최근에 올라온 글
최근에 달린 댓글
글 보관함
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
링크
- Total
- Today
- Yesterday