Tôi đang cố gắng điền vào một uitableview với nhiều phần. Đây là mã của tôi:Các vấn đề về UITableView với cellForRowAtIndexPath
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
case 1:
[[cell textLabel] setText:[usersTeachers objectAtIndex:(indexPath.row+1)]];
return cell;
break;
tôi nhận được lỗi này khi tôi cố gắng để tải quan điểm:
2009-12-28 21:09:48.380 FSS[2046:207] *** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit/UIKit-984.38/UITableView.m:4709
2009-12-28 21:09:48.381 FSS[2046:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
Mảng ở đó các bản ghi chỉ số như là một chuỗi hợp pháp nhưng nó không trở lại phòng giam đúng . Do đó, nó không tải quá điểm này. Hãy giúp tôi.
Tôi hiểu. Tôi đã thiết lập toàn bộ câu lệnh chuyển đổi. Tôi chỉ sử dụng đầu tiên để đưa ra một ví dụ về những gì đang xảy ra. Nó không chạy một trường hợp khác trước khi nó đưa ra lỗi. –