Hello,
I have been trying various methods with no success to alter the following code...
I have a nib file that works fine if I set all cells to this but I only want one of the switch statements to have the custom cell nib file. Any ideas?
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger row = [indexPath row];
NSInteger section = [indexPath section];
UITableViewCell *cell;
switch (section)
{
case 0:
cell = [tableView dequeueReusableCellWithIdentifier:@"any-cell"];
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"any-cell"] autorelease];
cell.text = [showTimes objectAtIndex:row];
break;
case 1:
cell = [tableView dequeueReusableCellWithIdentifier:@"any-cell"];
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"any-cell"] autorelease];
cell.text = [showTimes objectAtIndex:row];
break;
default:
cell = [tableView dequeueReusableCellWithIdentifier:@"any-cell"];
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"any-cell"] autorelease];
cell.text = [showTimes objectAtIndex:row];
break;
}
return cell;
}