Detect iOS8 Reachability Gesture

2019-02-18 09:40发布

问题:

Any ways to detect the new Reachability gesture of iOS8 in Objective-C?

The gesture is activated double tapping the TouchID button on the iPhone6 and iPhone6Plus.

回答1:

There are no public APIs for it.

There are two related private API methods on UIApplication I can find (using either of these should get your app rejected from the App Store):

  • _setReachabilitySupported:, which presumably would en/disable reachability (like Spotlight)
  • _deactivateReachability, which would return the view to the normal place on the screen

I don't see anything that informs your application that the user has performed the gesture, however.


You could also experiment with subclassing UIWindow and overriding setFrame:. Set a breakpoint in this method, and if it fires when you enable Reachability, you can look at the stack trace for more information.