Disable gesture recognizer iOS

▼魔方 西西 提交于 2019-12-01 13:25:38

The four- and five- finger gestures are not officially part of iOS, and may never be.

Though it would be best to figure out an alternative, you should be able to use these gestures for now and not fear conflicts (save on the iPads of developers who have specifically turned on this feature, whose users know that said features may conflict with apps.)

I don't completely understand your question.

You can add UIGestureRecognizer to objects. You can also remove them.

- (void)removeTarget:(id)target action:(SEL)action

For example:

  [imageView addGestureRecognizer:singleTap];
  [imageView removeGestureRecognizer:singleTap];

One alterative is to change your design to avoid 4-5 finger swipe. From what i know, the 4-5 gesture setting is for end-users to return home screen/open up multitasking bar and you can't do anything about it till Apple releases it for developer, right now it's still on the stage of experimenting for end users.

You can use a UITapGesture and set the number of touches in the Attribute Inspector if you want multiple touches. Doesn't this do what you want?

when you go to gestures in the assistive touch menu, to disable it you swipe to the right like you would to delete a song or a note.

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