Currenly in my cellForRowAtIndexPath function i have subclassed two UILabels that holds the values inside the cells.
Lets say for example that the values presented in one cell is
Value 1 Value 2
and if Value 2 is equals to @"0,00" That cell needs to be set disabled and have it’s cell.accessoryType set to None
-(UItableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [myTableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [self getCellContentView:CellIdentifier];
}
UILabel *lblValues = (UILabel *)[cell viewWithTag:1];
UILabel *lblsecValues = (UILabel *)[cell viewWithTag:2];
lblvalues.text = [values objectAtIndex:indexPath.row];
lblsecValues.text = [secValues objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewAccessoryDisclosureIndicator;
/*
if ( something..... ){
//cell holding the `@"0,00"`
//cell.accessoryType = UITableViewAccessoryNone;
//cell.setUserInteractionEnabled = NO;
}
*/
return cell;
}
Any tips and/or suggestions how to find the proper condition will be highly appreciated. Thanks in advance.
Use the following code