An app I am developing requires a three-point swipe gesture.
I have successfully implemented this using a UIGestureRecognizer
and it works fine for the most part.
However, if you sw开发者_StackOverflowitch the device Zoom accessibility setting on (Settings > General > Accessibility > Zoom) this stops the gesture from being recognized.
The Zoom function uses various three-point gestures to operate, so I can understand this superseding my app gesture.
However, does anyone know how I can determine if the Zoom setting is turned on (or the zoom accessibility gesture performed) so I can at least advise the user that the gesture will not be recognized?
Thanks!
If you're targeting iOS 5, take a look at UIAccessibilityRegisterGestureConflictWithZoom()
. While it doesn't tell you if Zoom is enabled, it will let your users know when there's a conflict.
I would use an if statement to check if the user has accessability enabled then if they do, make your app do a four finger swipe.
if (isAccessabilityElement)
? have you tried that?
There is an option to find out is zoom set or not set in UIScrollView delegate methods but u can try using UIPinchGestureREcognizer in addition to swipe gesture recognizer. For Further information you can check out in apple's developer documentation.
精彩评论