Sto cercando di riempire una vista utente con più sezioni. Questo è il mio codice:UITableView Problemi con 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;
ottengo questo errore quando provo a caricare la visualizzazione:
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:'
L'array a che i registri indice come una stringa legittima, ma non restituisce il cellulare correttamente . Quindi non carica oltre questo punto. Per favore aiuto.
ho capito. Ho impostato un'intera istruzione switch. Ho solo usato il primo per dare un esempio di ciò che stava accadendo. Non esegue un altro caso prima che dia l'errore. –