【发布时间】:2012-08-18 03:33:30
【问题描述】:
for(NSUInteger j = 0 ; j < [sports count] ; j++){
NSIndexPath *loopPath = [NSIndexPath indexPathWithIndex:j];
if([pickerTable cellForRowAtIndexPath:loopPath].accessoryType == UITableViewCellAccessoryCheckmark){
[chosenSports addObject:[pickerTable cellForRowAtIndexPath:loopPath].textLabel.text];
}
}
此代码会产生 sigabrt 错误。确切的错误是“与 UITableView 一起使用的索引路径无效。传递给表视图的索引路径必须恰好包含两个指定部分和行的索引。如果可能,请使用 UITableView.h 中 NSIndexPath 上的类别。”提前致谢;
【问题讨论】:
标签: objective-c ios