[iOS] UIButton에 backgroundColor 설정 하기
UIButton에 background를 상태에 따라 설정하기 위해서는 따로 extension이 필요합니다. (왜인지 모르겠는데 기본으로 제공되지 않습니다) extension UIButton { func setBackgroundColor(_ color: UIColor, for state: UIControl.State) { UIGraphicsBeginImageContext(CGSize(width: 1.0, height: 1.0)) guard let context = UIGraphicsGetCurrentContext() else { return } context.setFillColor(color.cgColor) context.fill(CGRect(x: 0.0, y: 0.0, width: 1.0, height:..
iOS Programming
2021. 8. 20. 14:42
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 멀티프로세스
- 프로세스
- sharedmemory
- 스냅킷
- 부캠
- rxcocoa
- optional
- 개발대외활동
- isNetworkAccessAllowed
- cs
- ios
- PHImageRequestOptions
- 스레드
- PHAsset
- returnKey
- 개발동아리
- OS
- swiftsoup
- RxSwift
- setBackgroundColor
- webcrawl
- Swift
- 프로세스간통신
- Xcode
- 쓰레드
- URLComponents
- 슈퍼스칼라
- 디프만
- WKUIDelegate
- 운영체제
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함