问题
I've just made a new UIView for my UIDatePicker. I was testing it with the default settings and all was ok (UIDatePickerModeDateAndTime) but as soon as I run [[picker picker]];
hell breaks loose..
UIDatePickerModeDateAndTime Mode:
UIDatePickerModeCountDownTimer Mode:
My debugger console also give 9 errors about not being able to find the mapped image for the following filenames:
- UITimerPickerFrameRight-180-Bar.png
- UITimerPickerFrameMiddle-180.png
- UITimerPickerFrameRight-180-Bar.png
- UITimerPickerBackground-180.png
- UITimerPickerFrameLeft-180-Bar.png
- UITimerPickerFrameMiddle-180.png
- UITimerPickerFrameRight-180-Bar.png
- UITimerPickerWheelBackground-180.png
- UITimerPickerWheelBackground-180.png
the exact error message is Could not find mapped image [IMAGE NAME]
the iPad i'm testing on is an iPad 2 running iOS5, this error can also be replicated on the iPad Simulator on both iOS 4 and 5.
Does anybody know of a walk around to this as the apps deadline is soon and I need this specific mode :/
I also haven't tried to replicate the issue on the iPhone as i know the clocks app doesn't have this issue.
回答1:
Make sure you are creating the UIDatePicker
with a height of 216
.
The UIDatePickerModeCountDownTimer
mode has a problem with anything less than that height.
来源:https://stackoverflow.com/questions/7799050/uidatepicker-uidatepickermodecountdowntimer-ipad-graphic-bug