示例: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.0];
错误原因: 里面的值为0-1 ,so你懂得
示例: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.0];