0
Currenly私のcellForRowAtIndexPath
関数では、私はセル内の値を保持する2つのUILabelsをサブクラス化しました。カスタムuilabel値に応じて特定のセルを無効にする方法はありますか?
は
とセルが無効に設定する必要があることを@"0,00"
に等しいとした値2であれば、それはだ値2値1
ある値は、一つのセルに提示することを例えば貸し付けcell.accessoryType
セット
-(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;
}
None
に任意のヒントおよび/またはプロを見つけるための方法を提案条件ごとに高く評価されます。前もって感謝します。
作品を使用してください。どうもありがとう! – doge