목록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