I am getting an issue with UILongPressGestureRecognizer, I have used this code:-
func addLongPressGesture(){
let lngPr = UILongPressGestureRecognizer.init(target: self, action: #selector(self.handleLongPress(gesture:)))
lngPr.delaysTouchesEnded = true
self.addGestureRecognizer(lngPr)
}
@objc func handleLongPress(gesture:UIGestureRecognizer){
if selectedIndexPath != nil && delegate != nil{
self.delegate?.delegateLongPressed(atIndexPath: selectedIndexPath!)
}
}