Uipicker background blur

166 Views Asked by At

When a uipicker gets presented to a screen. The background has a Light grey blur effect in the background by default. How do I change the color of this haze?

1

There are 1 best solutions below

1
On BEST ANSWER

Try using the below code.

pickerView.subviews.last?.backgroundColor = .red.withAlphaComponent(0.2)

UIPickerView consists of 2 subviews. One is the main container and the second one is the selection indicator. So we just simply change the background of the second i.e last subview.