- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
MyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
cell.firstLabel.text = [NSString stringWithFormat:@"%d", indexPath.row];
cell.secondLabel.text = [NSString stringWithFormat:@"%d", NUMBER_OF_ROWS - indexPath.row];
return cell;
}
this is code snippet from Apple Table View Programming Guide
MyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
is working fine and need no checking against nil because the cell is defined in story board and alway return valid cell.
But if I am not using story board, programmatically how I will use multiple custom cells in my tableview? And what are issues involved allocating and initializing MyTableViewCell