Grab the code from the ViewController.swift file.
For the interface:
- Search for a component called Swipe Gesture Recognizer
- Grab it and drop it on top of the View (use the hierarchy to make sure you drop it on it, if you drop it on another element this code will not work)
- Select one of the Swipe Gesture Recognizer in the hierarchy and go to its attribute page. Change Swipe to Left.
- Make sure the other recognizer has the Swipe attribute to Right
- Select UIScrollView and uncheck Scrolling enabled
- Connect detectSwipe() to both recognizers.
HAVE FUN!