-1

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?

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
kitchen800
  • 197
  • 1
  • 12
  • 36

1 Answers1

1

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.

Prabh Kaur
  • 36
  • 1
  • 5