simbesi.com
simbesi.com

Reputation: 1529

how to disable the table cell in my tableview?

i have a my requirement disable the table cell.i have controls on that cell like(textFeild,imageview,button).when i access one control it prefprms another action so plz help me . thanks in advance.

Upvotes: 5

Views: 4919

Answers (3)

Franji
Franji

Reputation: 11

It could also apply a color effect:

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

Upvotes: 1

Vin
Vin

Reputation: 10548

I would suggest using custom UITableViewCells. Put all your controls on custom cells, that way all the events pertaining to that controls would be called in the actions in your custom cell class. In the tableView class you just don't have to give any implementation for didSelectRowAtIndexPath. That way your controls on the cells would be clickable.

Upvotes: 1

visakh7
visakh7

Reputation: 26400

It is not clear what you want exactly. If you just want to disable the cell i think you mean this

cell.userInteractionEnabled = NO;

But what do you mean by when i access one control it performs another action ?

Upvotes: 10

Related Questions