[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
- Xcode
- returnKey
- cs
- 프로세스
- ios
- Swift
- rxcocoa
- 스냅킷
- RxSwift
- 개발대외활동
- 멀티프로세스
- optional
- 개발동아리
- sharedmemory
- swiftsoup
- setBackgroundColor
- 운영체제
- isNetworkAccessAllowed
- OS
- webcrawl
- WKUIDelegate
- 디프만
- URLComponents
- 쓰레드
- 스레드
- 프로세스간통신
- 슈퍼스칼라
- PHAsset
- PHImageRequestOptions
- 부캠
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함