UIDatePicker崩溃:无法分配100,000行

时间:2013-01-03 23:09:40

标签: ios uikit uidatepicker

使用iOS日期选择器时,我遇到了罕见的崩溃。

崩溃是: NSInternalInconsistencyException 无法在第0节中为100000行分配数据存储。请考虑使用较少的行

UITextField *dateinput = [[UITextField alloc] initWithFrame:CGRectMake(26, yOffset, 268, 35)];
[dateinput setPlaceholder:@"Ends:"];
[dateinput setText:@""];
[self configureTextField:dateinput];
[footer addSubview:dateinput];
[self setDateinput:dateinput];

UILabel* dateinputLabel = [[UILabel alloc] initWithFrame: CGRectMake(26, yOffset - 21, 268, 30.0f)];
[dateinputLabel setTextColor:[UIColor colorWithRGBHex:0x777777]];
[dateinputLabel setFont:[UIFont fontWithName:@"Helvetica" size:11]];
[dateinputLabel setBackgroundColor:[UIColor clearColor]];
dateinputLabel.text = @"End Date";
[footer addSubview:dateinputLabel];

UIDatePicker *datePicker = [[UIDatePicker alloc] init];
[datePicker setDatePickerMode:UIDatePickerModeDate]; //crash on this line
[dateinput setInputView:datePicker];

由于某种原因,日期选择器在内部分配大量行并崩溃,因为没有那么多行可用。

日期选择器分配这么多行的行为是否正确?如果没有,任何人都能看到我正在做的事情导致这种奇怪的行为吗?

请注意,我无法复制此问题。很明显,少数用户受到影响(通过崩解剂)

0 个答案:

没有答案
相关问题