无法连接故事板放松Segue [英] Cannot Connect Storyboard Unwind Segue

查看:99
本文介绍了无法连接故事板放松Segue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个展开segue但是当按住Ctrl键拖动时没有任何内容会连接到它。此外,当我右键单击退出图标时,没有可用选项。

I am attempting to create an unwind segue but nothing will connect to it when ctrl+dragging. Also when I right click on the Exit icon there are no options available.

任何想法?

推荐答案

您需要在视图控制器上定义一个IBAction,其参数类型为UIStoryboardSegue *。

You need to have an IBAction defined on a view controller that takes an argument of type "UIStoryboardSegue *".

这样的事情:

@interface MyViewController
...
- (IBAction)unwindFromConfirmationForm:(UIStoryboardSegue *)segue {
}
...
@end

Swift 3版本

@IBAction func unwindToViewController(segue: UIStoryboardSegue) {

    //code

}

DoruChidean https://stackoverflow.com/a/46199117 / 250190

这篇关于无法连接故事板放松Segue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆