I want tableView not to load a cell that contains some string, how to do that?
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
NSString *itemTitle = item.title;
if ([item.title isEqualToString: @"Some string"])
{
// Help needed
}
else
{
cell.textLabel.font = [UIFont boldSystemFontOfSize:15];
cell.textLabel.text =itemTitle;
}
return cell;
- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
Better option is to update your data before providing loading the table.
If both of above fails then you can try following method
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
Return 0 if you don't want cell to appear on screen. Probably cell with height 0 will not appear.
If above don't work then post here so that i can assist further....