ios 4.2.1和uidatepicker存在问题。 我的应用程序在iPad上运行,选择器在UIPopoverController中。 在iOS 3.2上,该应用程序运行正常。 当我旋转选择器的任何一个轮子时,应用程序崩溃了这个堆栈跟踪:
*由于未捕获的异常'NSRangeException'而终止应用,原因:' - [NSMutableArray objectAtIndex:]:索引2147483647超出边界[0 .. 2 ]” * *第一次投掷时调用堆栈: ( 0 CoreFoundation 0x01165be9 exceptionPreprocess + 185 1 libobjc.A.dylib 0x012ba5c2 objc_exception_throw + 47 2 CoreFoundation 0x0115b6e5 - [__ NSArrayM objectAtIndex:] + 261 3 UIKit 0x002e9b74 - [UIPickerView reloadComponent:] + 62 4 UIKit 0x004cb6a9 - [UIDatePickerView _updateDateOrTime] + 1273 5 UIKit 0x004cb114 - [UIDatePickerView pickerView:didSelectRow:inComponent:] + 42 6 UIKit 0x002e9194 - [UIPickerView _sendSelectionChangedForComponent:] + 100 7 UIKit 0x002e8f75 - [UIPickerView scrollerDidEndSmoothScrolling:] + 75 8 UIKit 0x004924c7 - [UIScroller(内部)_stopScrollingNotify:dealloc:pin:] + 692 9 UIKit 0x00493ed0 - [UIScroller(静态)_smoothScroll:] + 4743 10 UIKit 0x0048a188 ScrollerHeartbeatCallback + 129 11 GraphicsServices 0x01a9d447 HeartbeatTimerCallback + 35 12 CoreFoundation 0x01146fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 19 13 CoreFoundation 0x01148594 __CFRunLoopDoTimer + 1220 14 CoreFoundation 0x010a4cc9 __CFRunLoopRun + 1817 15 CoreFoundation 0x010a4240 CFRunLoopRunSpecific + 208 16 CoreFoundation 0x010a4161 CFRunLoopRunInMode + 97 17 GraphicsServices 0x01a9a268 GSEventRunModal + 217 18 GraphicsServices 0x01a9a32d GSEventRun + 115 19 UIKit 0x0030242e UIApplicationMain + 1160 20议程0x0000245c main + 102 21议程0x000023ed start + 53 ) 抛出'NSException'实例后终止调用 程序收到信号:“SIGABRT”。
有什么想法吗?
答案 0 :(得分:1)
问题在于您的阵列范围。