Swift - 在超类中声明的IBAction不会反映在storyboard中的子类中

时间:2014-08-07 04:27:52

标签: ios uiviewcontroller swift ibaction

我已经实现了UIViewController的子类,如下所示:

import UIKit

class LoadImageViewController: UIViewController {

    @IBAction func loadImageAction(sender : AnyObject) {
    }
}

然后我实现了LoadImageViewController的子类:

class ProfileSnapViewController: LoadImageViewController {
    // an empty implementation
}

在storyboard中,我将UIViewController的类分配为ProfileSnapViewController,然后我尝试将其超类中声明的IBAction绑定到一个按钮,但令我惊讶的是,当我右键单击文件所有者时,它没有显示动作。 / p>

enter image description here

有什么想法吗?

0 个答案:

没有答案