Swift - Swift Gesture Counter - Demo 4 of 30
App created in Xcode 10.3 (10G8) using Swift 4.2, iOS Deployment Target 12.4 and tested on a iPhone Xr Emulator
In this demo app we demonstrate how to code the swift Gesture Counter.
When the user clicks the icon they are taken right into the app. They are greeted with the title on top 'Gesture Counter'. Then in the middle of the app is a label with the directions 'Tap or Tap Hold Move' with a large counter (default value = 0) followed below. On the bottom right hand corner is a 'Rest' Button that when clicked resets the counter back to 0. The app is played by either tapping the screen or doing a tap, hold and move motion which as you moves will give you more points.
This app useds two gesture controls:
- Tap Gesture Recognizer which gives us a point for each tap.
- Long Press Gesture Recognizer which gives us a point for each spot it moves over as you drag tap.
Details and the screen cap images of the app in use can be found on Digital Mirko.
Screen Cap on a iPhone Xr device:(shown below)
(Left image)App Started.
(Middle Image)Screen Tapped and Tapped Hold Move.
(Right image)'Reset' button clicked, Counter reset to 0.