之前在iOS 8里面用 可以hook SpringBoard里面的 -(void) _menuButtonDown:(id)down来hook home键;可是在iOS 10中就不起作用了。class-dump了SpringBoard,在头文件里面没找到 -(void)_menuButtonDown:(id)down这个方法,貌似是被取代了,,,请问在iOS 10中还有什么方法能够hook 按下home键这个事件?谢谢各位啦!
同问!
-[SBHomeHardwareButtonActions init]
-[SBHomeHardwareButtonActions guidedAccessWasActivated]
-[SBHomeHardwareButtonActions guidedAccessWasDeactivated]
-[SBHomeHardwareButtonActions setButtonDown:]
-[SBHomeHardwareButtonActions performInitialButtonDownActions]
-[SBHomeHardwareButtonActions performInitialButtonUpActions]
-[SBHomeHardwareButtonActions _performButtonPreflightActions]
-[SBHomeHardwareButtonActions _shouldIgnorePressesDueToProxOrIdle:]
-[SBHomeHardwareButtonActions performSinglePressUpActions]
-[SBHomeHardwareButtonActions performLongPressActions]
-[SBHomeHardwareButtonActions performDoublePressDownActions]
-[SBHomeHardwareButtonActions performTriplePressUpActions]
-[SBHomeHardwareButtonActions performFinalButtonUpActions]
-[SBHomeHardwareButtonActions performLongPressCancelledActions]
-[SBHomeHardwareButtonActions performDoubleTapUpActions]
-[SBHomeHardwareButtonActions _preheatPluginForPresentationAfterInterval:]
-[SBHomeHardwareButtonActions _cancelPreheatingOfPlugin]
-[SBHomeHardwareButtonActions performWhenMenuButtonIsUpUsingBlock:]
-[SBHomeHardwareButtonActions performAfterMenuButtonUpIsHandledUsingBlock:]
-[SBHomeHardwareButtonActions _logMenuButtonHoldTime]
-[SBHomeHardwareButtonActions currentLongPressDuration]
-[SBHomeHardwareButtonActions setCurrentLongPressDuration:]
-[SBHomeHardwareButtonActions bannerDestination]
-[SBHomeHardwareButtonActions setBannerDestination:]
-[SBHomeHardwareButtonActions notificationCenterDestination]
-[SBHomeHardwareButtonActions setNotificationCenterDestination:]
-[SBHomeHardwareButtonActions isButtonDown]
试试这个, 我记得可以