Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

datepicker is incorrect in ios9

Tags:

ios9

swift2

good morning :)

i have a problem with my datepicker in ios 9 swift 2

this is how my datepicker looks like in ios 8 swift 2 [OK]: enter image description here

and this is my datepicker in ios 9 swift 2 [NOT OK]: enter image description here

Any ideas how i can solve it?

like image 480
Ghost108 Avatar asked Aug 02 '15 07:08

Ghost108


1 Answers

I had similar issue with UILabel and UIDatePicker in same cell.

with issue

I figure out that setting witch for UIDatePicker based on container view width. Will cause this error, for ex:

  • Leading and Tailing to container view
  • Equal width as container view

But when you set width as:

  • Given width ex. 400
  • Equal width as UILable above

without issue

I hope this will help someone.

PS. I've set gray background for better look. First screen shot shows that UIDatePicker have some issues with rendering. I'm only guessing.

like image 186
Błażej Avatar answered Oct 02 '22 05:10

Błażej