Get Updates By E-mail 

Article Written By:
Johann Dowa

Sensitive – Swift Library That Dramatically Simplifies Implementing Common Gesture Support

  •  
  •  
  •  
  •  
  •  

Sensitive is an open source Swift library from Igor Matyushkin that provides a very simple syntax for handling the most common gestures.

With Sensitive you don’t need to worry about utilizing UIGestureRecognizer but rather simply add the Sensitive gesture handlers to a UIView, set your callback, and configure some variables.

This example shows how one would set up a simple double tap gesture recognizer that changes the view color.:

let view = UIView()

view.onTap({ (tapGestureRecognizer) -> Void in
    // Handle tap on view
view.backgroundColor = .greenColor()
}) { (tapGestureRecognizer) -> Void in
    // Configure gesture recognizer
    tapGestureRecognizer.numberOfTouchesRequired = 1
    tapGestureRecognizer.numberOfTapsRequired = 2
}

Within sensitive are gesture handlers for tap, swipe, pan, pinch, and rotation gestures.

You can find Sensitive on Github here.

A nice simple way to handle gestures with a clean Swift syntax.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments