How to disable a table cell in my table view?

I have my requirement to disable the table cell.i there are controls in this cell, for example (textFeild, imageview, button). When I access one control, it prescribes a different action, so the PLZ will help me. thanks in advance.

+5
source share
3 answers

It is not clear what you want for sure. If you just want to disable the cell, I think you mean it

cell.userInteractionEnabled = NO;

But what do you mean by , when I refer to one control, it performs another action ?

+10
source

UITableViewCells. , , , , . tableView - didSelectRowAtIndexPath. , .

+1

It can also apply color effect:

    UIView *lab = [[UIView alloc] initWithFrame:cell.frame];
    [lab setBackgroundColor:[UIColor lightGrayColor]];
    cell.backgroundView = lab;
+1
source

All Articles