colorwithrgb专题

为什么colorwithRGB不起作用?

示例:self.table.backgroundColor = [UIColor colorWithRed:242 green:242 blue:242 alpha:1.0]; 应改为:  self.table.backgroundColor = [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1.