ios - 检测 iOS8 可达性手势

标签 ios ios8 gestures iphone-6

有什么方法可以在 Objective-C 中检测 iOS8 的新 Reachability 手势?

双击 iPhone6 和 iPhone6Plus 上的 TouchID 按钮激活手势。

enter image description here

最佳答案

它没有公共(public) API。

two related private API methods on UIApplication我可以找到(使用其中任何一个都会让你的应用程序被 App Store 拒绝):

  • _setReachabilitySupported:,可能会启用/禁用可达性(如 Spotlight)
  • _deactivateReachability,这会将 View 返回到屏幕上的正常位置

但是,我没有看到任何通知您的应用程序用户已执行手势的信息。


您还可以尝试继承 UIWindow 并覆盖 setFrame:。在此方法中设置一个断点,如果它在您启用可达性时触发,您可以查看堆栈跟踪以获取更多信息。

关于ios - 检测 iOS8 可达性手势,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26371061/

相关文章:

ios - Swift3 - UICollectionViewCel 的 intrinsicContentSize 是 (-1, -1)

ios - RevMob 全屏广告在 iOS 上崩溃

ios - 在 AppDelegate 之外,我如何在基本上 `performSegueWIthIdentifier` 之前在 UINavigationController 中包含一个 UIViewController?

ios - 调用 reloadData 时 didDeselectItemAtIndexPath 不起作用

ios - 使用 UIScrollView 和多个 UIButtons 延迟滚动

ios - 获取与 Phibrow App 相同的标签动画

ios - UIScrollView 优于 MKMapView

ios - iOS 导航栏中标题的分页效果

SWIFT:不知道如何将选定的值从弹出窗口返回到调用 Controller

ios - iOS 中的平移和滑动有什么区别?