Gestures
Gestures are a way to recognize and respond to touch events. They are used to add interaction to SwiftUI views. Some examples of gestures that are used include zooming in on images by pinching, dismissing views by swiping down, and double tapping.
We can conceptually divide gestures into three categories: basic, advanced, and composite.
Basic gestures attach a single simple straightforward gesture to a view, such as tapping or swiping, and they are typically simple to implement because they can be implemented with a few lines of code. These actions mimic natural human actions and are intuitive for human users. Their behavior is what the user normally expects by having been exposed across multiple applications and as such they minimize the cognitive load required to interact with the app; users don’t need to think hard to remember complex gestures.
Complex gestures, both advanced and composite, instead involve multiple touch points (multiple fingers) and multiple...