1中的情节提要板连接自定义协议委托

1中的情节提要板连接自定义协议委托

本文介绍了无法从Xcode 6.1中的情节提要板连接自定义协议委托的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将Mac升级到10.10,将Xcode升级到6.1,

I just upgraded my mac to 10.10 and Xcode to 6.1,

发现了一个关于情节提要的奇怪事情,

found a strange thing which about storyboard,

我的案例正在使用一个快速项目,无法再从情节提要中连接自定义协议委托.

my case is using a swift project, can not connect custom protocol delegate from storyboard anymore.

旧版本的Xcode附带的旧连接很好,但是我无法再连接任何新的委托.

the old connected which comes with old version of Xcode is fine, but I can not connect any new delegate anymore.

即使我删除了旧的连接,也无法重新连接旧的连接.

even I can not reconnect the old one once I removed the connected.

有人发生这种情况吗?

==============================更新============= ================

@objc public protocol VideoViewResizeDelegate {

    func shouldVideoViewResetLayout(videoView: GvVideoView) -> Bool;

}

@IBOutlet var resizeDelegate: VideoViewResizeDelegate?;
@IBDesignable public class ViewController: UIViewController, VideoViewResizeDelegate {

...

}

推荐答案

https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051

Interface Builder不支持连接到Swift中的插座 当插座的类型为协议时,文件.声明出口的类型 作为AnyObject或NSObject,使用 Interface Builder,然后将插座的类型改回协议. (17023935)

Interface Builder does not support connecting to an outlet in a Swift file when the outlet’s type is a protocol. Declare the outlet's type as AnyObject or NSObject, connect objects to the outlet using Interface Builder, then change the outlet's type back to the protocol. (17023935)

太烂了...

这篇关于无法从Xcode 6.1中的情节提要板连接自定义协议委托的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 18:34