I am attaching a UISwipeGestureRecognizer to a UITableViewCell in the cellForRowAtIndexPath: method like so:
- (UITabl
Adding gesture in AwakeFromNib method works with no problems.
class TestCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
let panGesture = UIPanGestureRecognizer(target: self,
action: #selector(gestureAction))
addGestureRecognizer(panGesture)
}
@objc func gestureAction() {
print("gesture action")
}
}