본문 바로가기

프로그램 경험/iOS

[iPhone] UIColor 색상 각 구성데이터 가져오기

UIColor *lineColor = [UIColor redColor];

const CGFloat *components = CGColorGetComponents(lineColor.CGColor);


NSString *msg = [NSString stringWithFormat:@"%f,%f,%f", components[0],components[1],components[2]];