Detect iOS8 Reachability Gesture

半城伤御伤魂 提交于 2019-12-19 09:07:59

问题


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.



来源:https://stackoverflow.com/questions/26371061/detect-ios8-reachability-gesture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!