Im building an app that needs to detect a swipe gesture, the detector needs to recognize a swipe in any direction (not only Up, Down, Left, Right), the swipe can be in any direction for example somewhere around up and left.
The app features a ball in the middle of the screen, when the user swipes(flings) in any direction the the ball should shoot in that direction, so if the user shoots to a corner the ball should go to the corner of the screen. I don't want to use Unity or any engine, can anyone help me with the code for swift (not swiftUI)? Thank you in advance!