I'm using UIDragInteraction and it works perfectly.
let dragInteraction = UIDragInteraction(delegate: self)
myView.addInteraction(dragInteraction)
dragInteraction.isEnabled = true
As intended, the drag starts when I make a long press on myView. I now want to change this behavior. Instead of long press, I want the drag to start immediately on touching myView and moving my finger?
I've tried using a pan gesture to initiate the move but I don't know how to get the dragInteraction to start.
let panGesture = UIPanGestureRecognizer(target: self, action: #selector(panAction))
panGesture.minimumNumberOfTouches = 1
panGesture.maximumNumberOfTouches = 1
panGesture.cancelsTouchesInView = false
panGesture.delaysTouchesBegan = false
myView.addGestureRecognizer(panGesture)
Please help. Thanks.