Oh UIDatePicker how I hate thee.
While working on Storm Sim for iOS 7 I ran into a problem on the Sleep Timer screen. There, I am using a UIDatePicker in countdown timer mode. This is what it looked like (I had already given up on trying to get a dark background for that screen; the UIDatePicker won't let you change text color.)
Reveal is a great app for inspecting the UIView hierarchy, but don't ever poke UIDatePicker. How many views, subviews, and UITableViews can you pack into such a tiny space anyway?
But I was able to confirm that certain subviews were making their background black regardless of what else was going on.
I tried deleting it and re-adding it, changing all sorts of settings. Nothing worked. Perhaps the XIB file was corrupted?
I started a test project to re-implement the countdown timer mode with a UIPicker, but why would anything ever work? UIPicker has no facility to put in fixed labels, so for a countdown timer your "hours" and "min" labels scroll instead of the numbers depending on where you drag. Great.
Then on a hunch I moved to creating the picker in code. The behavior disappeared.
To fix the text color issue, I am using the category on UILabel solution from this stack overflow post.
It seems absolutely insane that you can't change the picker text color, but when you see what UIPopoverViewController makes you do to customize it, well... you stop being surprised.
This blog represents my own personal opinion and is not endorsed by my employer.