I have the following code for handling swipe gestures.
func handleSwipes(sender:UISwipeGestureRecognizer) {
if (sender.direction == .Right) {
print("Swipe Right")
self.performSegueWithIdentifier("eventsModally", sender: self)
}
}
What is the best practice to make this method available throughout the project, rather than embed it in every ViewController class?
Help is greatly appreciated.
source
share