I have a UIImageViewtable cell inside and I added tapGesture. I want to access UIImageViewin the handleTap method.
This is the code for the image inside the TableCell:
func setImageForCell(cell:ImageCell, indexPath:NSIndexPath) {
var image : UIImage = UIImage(named: "brunnen1")!
cell.customImageView.userInteractionEnabled = true
cell.imageView!.tag = indexPath.row;
var tapGestureRecognizer = UITapGestureRecognizer(target:self, action:Selector("handleTap:"))
tapGestureRecognizer.numberOfTapsRequired = 1;
cell.customImageView.addGestureRecognizer(tapGestureRecognizer)
cell.customImageView.image = image
}
func handleTap(sender : UIView) {
}
Think I need to drop it from UIView?
source
share