В моей функции cellForRowAtIndexPath
я разделил две UILabels, которые содержат значения внутри ячеек.
Допустим, например, что значения, представленные в одной ячейке, равны
Значение 1 Значение 2
, а если значение 2 равно @"0,00"
Эту ячейку необходимо отключить и установить cell.accessoryType
на 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;
}
Будем весьма благодарны за любые советы и / или предложения, как найти правильное состояние.Заранее спасибо.