UIPickerView as inputView always shows gray background on iOS 7

I have a UIPickerView as inputView for a UITextField and can successfully set the background on iOS 8:

statePicker.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.25f];

But on iOS 7, I will be damned if every thing I tried from the other answers only leads to the following:

statepicker

Thoughts?

+5
source share
1 answer

Make sure your UITextField does not have the Appearance set to Dark in the attribute inspector, just below the Keyboard Type parameter. If so, set it to Default .

+3
source

All Articles