Change UIPickerView background

前端 未结 9 1049
天涯浪人
天涯浪人 2020-11-27 15:38

I want to change the border color of a UIPickerView. I do not see a tint property for the UIPickerView. Is there any way this could be done? Or a workaround?

Thanks.

9条回答
  •  無奈伤痛
    2020-11-27 16:25

    Simply add this line to one of your UIPickerView methods:

    [[[MyPicker subviews] objectAtIndex:4] setBackgroundColor: [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"image.png"]]];
    

提交回复
热议问题