3

Basically I just want to change the color of the seperator lines:

enter image description here

I think for obj-c there is an answer here: link. But I have difficulties to translate it in Swift. How to do that?

Community
  • 1
  • 1
MJQZ1347
  • 2,607
  • 7
  • 27
  • 49
  • Don't do it. If Apple wanted you to be able to modify / customize this feature of a UIPickerView, they would have provided API for doing so. Performing unsupported modifications of built-in interface classes can get your app rejected from the App Store. – matt Apr 18 '15 at 15:49
  • there isn;t answer because they put a image on the foreground,but you want color,there is no color – Stefan Scoarta Apr 18 '15 at 15:49
  • Thanks for the answers. So this means Apple wants me to use UIPickerView only on light backgrounds? – MJQZ1347 Apr 18 '15 at 16:01
  • Unbelievable ... we can't change the horizontal lines color? – Matthew Ferguson Nov 03 '17 at 01:08

1 Answers1

0

[Hi] you can do this,

pickerView.subviews[1].backgroundColor = UIColor.white
pickerView.subviews[2].backgroundColor = UIColor.white
Emre Celebi
  • 34
  • 1
  • 4