Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableViewCell is not clickable

I have a custom UITableViewCell with lot of buttons, textfields, labels and a view. I hide and show them where they are required on each indexpath. But for some reason/s rows are not clickable!

I even have done the following things via code to make sure that if something is going on fishy in IB, it can be fixed via these lines but of no use.

cell.selectionStyle = UITableViewCellSelectionStyleBlue;
cell.userInteractionEnabled = YES;

I am wondering if hidden views are the culprit here or something else?

like image 964
itsaboutcode Avatar asked Nov 06 '12 11:11

itsaboutcode


1 Answers

try this tableView.allowsSelection=YES;

and you can implement -(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:

like image 70
Mohammad Rabi Avatar answered Nov 13 '22 14:11

Mohammad Rabi