Avoid UIDatePicker transparency in iOS7
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.
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];
you can add a uiview with any color behind the uidatepicker. it will work for you.
[UIView appearanceWhenContainedIn:[UITableView class], [UIDatePicker class], nil].backgroundColor =[UIColor colorWithWhite:1 alpha:0]; pickerView.backgroundColor=[UIColor whiteColor]; anotherView.backgroundColor=[UIColor whiteColor];//Another view on which you subview picker