Haptic Touch gesture recognizer for iPhone Xʀ
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.



”iPhone Xʀ has a new feature we call Haptic Touch. So to get to the camera from the home screen, we just press on it. You feel a haptic tap, and you’re taken right to the camera.“

Phil Schiller

A gesture recognizer for iPhone Xʀ's Haptic Touch™ feature

  • Works just like a UILongPressGestureRecognizer
  • Plays haptic feedback just like iPhone Xʀ's home screen


In your Podfile:

pod 'HapticTouchGestureRecognizer'

Then run pod install.


In your View Controller:

override func viewDidLoad() {

    let hapticTouchGestureRecognizer = HapticTouchGestureRecognizer(target: self,
                                                                    action: #selector(detected(gestureRecognizer:)))

@objc func detected(gestureRecognizer: HapticTouchGestureRecognizer) {
    guard gestureRecognizer.state == .began else { return }
    // handle long press here
    // haptic feedback plays automatically