In this iOS Touches & Gestures article, we will briefly talk about the use of the Touches Moved Function as well as the adding a new custom gestures of our own.
Functions for Touches and Gestures in iOS
Touches moved method is the next in line of the touches actions. Similar to both touches began and ended, it returns both the current location and the previous location of the touch in the view.
What are function overloads:
We use function overloads to call the same method but with different parameters or arguments. Function overloads helps us add functionality to our code based on what we expect to write in the code.
Custom Gestures in iOS
In order to add GestureRecognizers in the code, we have to add them to a view. To use a GestureRecognizer we should sub-class it.
Summary
To sum up, you can use the existing gestures to achieve a variety of user interface interactions. If you need better control over how the gesture actually functions, you might want to consider using one (or a few) of the touchesBegan, touchesMoved or the touchesEnded methods.
Interested in learning more in-depth concepts?
If you are interested in learning more about mobile app development, I invite you to join my complete iPhone or Android course(s):