본문 바로가기 메뉴 바로가기

fruits

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

fruits

검색하기 폼
  • 분류 전체보기 (57)
    • Swift (9)
    • iOS Programming (27)
    • Algorithm (9)
    • CS (8)
    • Music Review (2)
    • Just Chat (1)
    • GitHub (1)
  • 방명록

setBackgroundColor (1)
[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
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • cs
  • RxSwift
  • Xcode
  • 쓰레드
  • PHImageRequestOptions
  • returnKey
  • 부캠
  • 개발대외활동
  • 프로세스간통신
  • 디프만
  • 멀티프로세스
  • 운영체제
  • sharedmemory
  • 개발동아리
  • 스냅킷
  • WKUIDelegate
  • Swift
  • isNetworkAccessAllowed
  • 슈퍼스칼라
  • swiftsoup
  • webcrawl
  • OS
  • setBackgroundColor
  • URLComponents
  • 스레드
  • PHAsset
  • optional
  • ios
  • rxcocoa
  • 프로세스
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바