问题
I have a requirement in an app, where the user will be taken to the homepage of the particular app when he does a four finger pinch from any other screen apart from the home screen. But the four finger pinch gesture is Apple's default gesture to put the app in the background.
Is there any particular way we can over ride this gesture? Also if I over ride the gesture, will it be allowed in the AppStore?
Any help will be appreciated.
回答1:
See Apple's Human Interface Guidelines:
Support Gestures Appropriately
Avoid associating different actions with the standard gestures users know. For example, take care to avoid redefining the meaning of the “swipe down from the top” gesture that reveals Notification Center.
Overriding a OS-level gesture is a good way to break usability and create an unhappy user. It may be possible to override the 4-finger pinch with a custom UIGestureRecognizer
, but this is in violation of Apple's usability standards.
来源:https://stackoverflow.com/questions/12541530/over-ride-four-five-finger-pinch-gesture