Detect second tap on tableview cell iphone sdk
- by neha
Hi all,
In my application, I'm expanding a tableview row when it's tapped. I'm using
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
if( selected == YES ) {
[self expandRow];
}
else {
[self contractRow];
}
height = [lblFeed frame].size.height + 75;
}
to achieve that.
So when a row is tapped, this function automatically gets the signal of row tap and it sets the selected=YES.
Now when I tap the same expanded row, it still sets selected=YES. I want to detect the second tap and contract the row. How shall I do that while using the same function?