iPhone生成颜色

CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB();
const CGFloat myColor[] = {0.90625, 0.80, 0.80, 1.0};
//CGColorCreate(rgb, myColor) to return a CGColorRef.
label.backgroundColor = [[UIColor alloc] initWithCGColor:CGColorCreate(rgb, myColor)];
label.textColor
= [[UIColor alloc] initWithRed:0.33 green:0.33 blue:0.33 alpha:1.0];

posted @ 2011-04-27 14:10  zaric  阅读(299)  评论(0编辑  收藏  举报