프로그래밍/iOS
UIColor 값을 RGB로 입력하는 매크로
백룡화검
2011. 4. 8. 14:29
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
* 사용법: UIColor color = UIColorFromRGB(0xF7F7F7);
출처 : http://lambert.tistory.com/428