Double Tap Segue to move to next storyboard

匆匆过客 提交于 2020-01-24 19:28:49

问题


I am making an app where the user has to double tap a segue to move to the next storyboard, but I cannot find anywhere where it tells you how to do this. Does anyone know how I can achieve this?


回答1:


If you do this in Interface Builder with a storyboard:

  1. Drag a tap gesture recognizer from the object library onto your view.

  2. Make sure the view you dragged it to has "user interaction enabled" checked.

  3. Select the tap gesture you added to your scene (which you can find in your document outline on the left side of Interface Builder's main panel; this document outline can be collapsed where you can't see it ... if you don't see it, select "Show Document Outline" from the "Edit" menu).

  4. Change the number of taps from 1 to 2.

  5. control-drag from the tap gesture in the document outline to the next scene and choose your type of segue you want.

Frequently, people will create their gesture recognizers in code, so if you're interested in how that works, let me know.




回答2:


Users do not interact with Segues and Storyboards in an app. Segues and Storyboards are tools that Apple provides within Xcode to aid in developing iOS apps.

If what you're asking is how to move to a new UIViewController once the user has double tapped a control (such as a UIButton), refer to this answer.



来源:https://stackoverflow.com/questions/18113079/double-tap-segue-to-move-to-next-storyboard

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