您必须将
ThumbnailTableViewCellDelegate协议声明为
@objc:
@objc protocol ThumbnailTableViewCellDelegate { func cellWasTouched(thumbnail: Bool, cell: UITableViewCell)}这是因为
@IBOutlet将变量声明为
weak,仅适用于对象。我不确定为什么不能只说协议符合
AnyObject,这也许是Swift的错误。

您必须将
ThumbnailTableViewCellDelegate协议声明为
@objc:
@objc protocol ThumbnailTableViewCellDelegate { func cellWasTouched(thumbnail: Bool, cell: UITableViewCell)}这是因为
@IBOutlet将变量声明为
weak,仅适用于对象。我不确定为什么不能只说协议符合
AnyObject,这也许是Swift的错误。