add gesture to image of cell

let tapGesture = UITapGestureRecognizer(target: self, action: #selector(self.tapEdit(_:)))
tableView.addGestureRecognizer(tapGesture)
tapGesture.delegate = self

func tapEdit(recognizer: UITapGestureRecognizer) {
if recognizer.state == UIGestureRecognizerState.Ended {
let tapLocation = recognizer.locationInView(self.tableView)
if let tapIndexPath = self.tableView.indexPathForRowAtPoint(tapLocation) {
if let tappedCell = self.tableView.cellForRowAtIndexPath(tapIndexPath) as? GenderCell {
//do what you want to cell here
tappedCell.actionShow()

}
}
}
}