Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIDatePicker Cutting Off Text & Not Displaying Days

My app is suddenly unable to correctly display UIDatePickers. I'm using storyboards. The Datepickers are set to just display the date. They are cutting off the month, and also not even showing the days. There's a big space in the middle. I have tried cleaning the project, resetting the simulator, checking localization settings, and checking to see if dynamic type size was set. I'm using Xcode 5.1.1 but the same thing happens in the beta of Xcode 6. Any suggestions would be appreciated.

Image Of Issue

like image 324
smileBot Avatar asked Sep 10 '14 01:09

smileBot


1 Answers

Ok, I figured it out. This happened as a result of trying to use UIAppearance on a tableView background color. This has nothing to do with tableViews on the face of it, but Apple must be using a tableView privately for the PickerViews. So, my attempt to set a UIAppearance via a category on a tableView background color seems to be doing something unexpected. Lesson learned. Don't try to use UIAppearance where they are not officially supported.

like image 99
smileBot Avatar answered Oct 23 '22 04:10

smileBot