Currently, I am building an app that contains a feature that uses a UIPanGestureRecognizer. Previously, I used an Intel Mac, and the UIPanGestureRecognizer velocity attribute is working correctly and return the expected value. However, after I switch to MacBook M1, the velocity of panGesture always returns 0.
@objc
func panGesture(_ recognizer: UIPanGestureRecognizer) {
view.endEditing(true)
let translation = recognizer.translation(in: self.view)
let velocity = recognizer.velocity(in: self.view)
// The velocity should have a value when a gesture is happening
//.....
} // End of PanGesture
Is there any patch or some action to make it work properly, same as with the Intel chip? I would please appreciate some suggestions to fix the issue.
FYI: Testing the app on real device, and it still working fine.