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.
You can change background color by completely replacing the background image with one of your choice using IXPickerOverlayView
available on GitHub (the repo contains an illustrated example of using this class).
Note that you'll have to draw out the (rectangular) background yourself from scratch but unlike any of the workarounds mentioned here this approach is fully dynamic: the control will look correctly even if you change the number of picker wheels and their sizes in runtime (like UIDatePicker does when you change your system locale setting).
Once you have your background image, using IXPickerOverlayView
is as simple as adding a IXPickerOverlayView
instance on top of your Picker view and assigning hostPickerView
property.