I have a UIImageView
inside a table cell and I added a tapGesture to it.
I want to access the UIImageView
in 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) {
// get the UIImageview from the sender, i guess ?
}
I guess I have to cast it from the UIView
?