UIButton with UITableViewCellSelectionStyleGray Selection Color

后端 未结 3 625
野性不改
野性不改 2021-01-19 14:42

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

3条回答
  •  醉梦人生
    2021-01-19 15:32

    Unfortunately I can't seem to find the actual color programmatically but DigitalColor Meter (OSX APP) says the color is 217 217 217

    UIColor* selectedColor = [UIColor colorWithRed:217.0/255.0 
                                             green:217.0/255.0 
                                              blue:217.0/255.0 alpha:1.0];
    

提交回复
热议问题