본문 바로가기

ㄷㅣㅆㅣ's Amusement

ㄷㅣㅆㅣ's Amusement

검색하기
ㄷㅣㅆㅣ's Amusement
프로필사진 ㄷㅣㅆㅣ

  • 분류 전체보기 (1026)
    • 쇼핑 (291)
    • 여행 (72)
    • 결혼 (160)
    • 맛집 (445)
      • 은평구 (136)
      • 서대문 (36)
      • 중구 종로구 (113)
      • 마포구 (54)
      • 용산구 (10)
      • 강남구 (12)
    • Handmade (1)
    • 커피 (2)
    • 맥주 (7)
    • Programming (41)
      • Android (15)
      • iOS (16)
      • React (5)
    • English (3)
Guestbook
Recent Posts
Recent Comments
«   2025/06   »
일 월 화 수 목 금 토
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
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록UIButton (1)

ㄷㅣㅆㅣ's Amusement

[iOS/Objective-c] UIButton background color 설정하기.

iOS에서 UIButton으로 작업하다보면 UIControlState에 따라 bacground color도 변경해야 할 때가 있는데, background image는 interface builder에서 변경 가능하지만 bg color는 그렇지 못하다. 따라서 bg clolor를 설정할 수 있는 category를 한개 더 만들어보도록 한다. (Objective-C 코드) 1234567891011121314151617181920#import "UIButton+BgColor.h" @implementation UIButton (BgColor)- (void)setBgColor:(UIColor *)color forState:(UIControlState)state{ // 버튼 백그라운드 이미지를 채우기위한 더미 뷰...

Programming/iOS 2015. 11. 30. 14:19
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바