साथ UITableView समस्याएं मैं कई वर्गों के साथ एक UITableView को भरने के लिए कोशिश कर रहा हूँ।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;
मैं इस त्रुटि मिलती है जब मैं दृश्य लोड करने का प्रयास: एक वैध स्ट्रिंग के रूप में
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:'
कि सूचकांक लॉग सरणी लेकिन यह सेल ठीक से वापस नहीं करता है यह मेरा कोड है । इस प्रकार यह इस बिंदु से पहले लोड नहीं करता है। कृपया मदद करे।
मैं समझता हूँ। मेरे पास एक संपूर्ण स्विच कथन स्थापित है। मैंने बस इतना ही किया कि क्या हो रहा था इसका एक उदाहरण देने के लिए। त्रुटि देने से पहले यह एक और मामला नहीं चलाता है। –