我有一个带有imageView的自定义单元格和在IB中创建的隐藏视图。双击图像我取消隐藏视图。我看到的问题是视图显示在tableview的备用单元格中。如何仅在用户点击的单元格上显示视图。
-(void) addRecognizer {
UITapGestureRecognizer *postGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imageTapped:)];
postGestureRecognizer.numberOfTapsRequired = 2;
[self.postImageView setUserInteractionEnabled:YES];
[self.postImageView addGestureRecognizer:postGestureRecognizer];
}
- (void) imageTapped:(UIGestureRecognizer *)recognizer
{
if(recognizer.state == UIGestureRecognizerStateRecognized)
{
[self.headingView setHidden:NO];
}
}
提前致谢