CGFloat R = (CGFloat) 242/255.0;
CGFloat G = (CGFloat) 242/255.0;
CGFloat B = (CGFloat) 242/255.0;
CGFloat alpha = (CGFloat) 1.0;
UIColor *myColorRGB = [UIColor colorWithRed: R green: G blue: B alpha: alpha ];
heighView.backgroundColor = myColorRGB;
原文地址:http://www.cnblogs.com/qianyindichang/p/3837141.html