I am trying to set the selected color for a UIButton to the color of \'UITableViewCellSelectionStyleGray\'; The problem is that the selection color of a UIButton cannot be s
Try this:
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(50, 50, 60, 20); button.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"orange.jpg"]]; [self.view addSubview:button];