Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望能够通过捏住 viewController A 上的屏幕来打开 viewController B。理想情况下,我希望能够在 Storyboard 中做到这一点。
任何帮助/方向将不胜感激。
谢谢
我不确定您可以直接在 Storyboard 中走多远,但最基本的是您添加一个UIGestureRecogniser对象并将其连接到您的视图控件并将其配置为捏合手势。然后,当UIGestureRecogniser接收到捏合事件时,它将触发您已将其连接到的操作,您可以触发一个segue您也可以在情节提要中配置的事件,或者您可以将新事件推UIViewController送到导航堆栈上。
UIGestureRecogniser
segue
UIViewController