When I set background color
for UIDatePiceker
in Interface Builder, nothing happens: the backgroundColor
property is nil
. But when I do it in code, it works fine. What's happening?
A work around I'm using is just creating a UIView behind it with a white background. Adding the same constraints as the date view (I also added a height constraint which may be redundant for the UIDatePicker but I needed it for the view behind it).
May be more work than you're looking for but it works for me instead of coding an outlet and setting the background on viewdidload.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With