I want to use RGB color to set set background color of UIButton.
I have lots of UIButtons so I decided to make a custom class.But when I try to use colorWithRed I am getting  error.
First Code:
[self.layer setBackgroundColor:[UIColor colorWithRed:60/255.0f green:146/255.0f blue:180/255.0f alpha:1.0f]];
Error

Second Code
  self.layer.backgroundColor = [UIColor colorWithRed:60/255.0f green:146/255.0f blue:180/255.0f alpha:1.0f];
Error
