Search code examples
iosuidatepicker

UIDatePicker has a weird white view below and one component label has different color with others


The datepicker is created from storyboard, I didn't customize it. And it works fine in device 6+ except 5s.

I made the cell background color to be clear. And seems the second component textcolor is white so I can scroll but cannot see exactly the value in it. I also try to set the picker background color to be other colors, it works for other components except the second one.

It's really weird. Anybody has idea about this?

enter image description here


Solution

  • In the viewDidLoad method change a property of the date picker. For example the mode and then reset it back. You may set some value and then reset it back.

    You may also want to try by setting UITableView separator style to None.