i just upgraded my app to iOS7 and found that date picker is transparent. It looks like I can see everything which is behind the date picker. How can I avoid this?
I tried to place date picker in another view. But still, its transparent.
How can I avoid transparency of UIDatePicker
? I've tried this link
1: can I change the font color of the datePicker in iOS7? but it didn't work.
Thanks in advance.
Edit : I've added a UIDatePicker
to a view named whiteborderview
.
whiteborderview.backgroundColor = [UIColor whiteColor];
whiteborderview.alpha = 1.0;
[whiteborderview addSubview:dtPkrStart]
and I got output like this
but still its transparent.
Edit2
I used this code and now its looking better than previous one
[UIView appearanceWhenContainedIn:[UITableView class], [UIDatePicker class], nil].backgroundColor = [UIColor colorWithWhite:1 alpha:1];
dtPkrStart.backgroundColor = [UIColor blackColor];
The date picker appearence changed like this
Just change background color of your date picker
datepicker.backgroundColor = [UIColor yourcolor];
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