“弱”一定不能应用于非类绑定,请考虑添加具有类绑定的协议一致性

rah*_*eem 12 protocols ios swift

我在VC中制定了一个协议,其中从我的swift文件类中获取了位置地标。在我的快速课堂上,我已经声明了这样的协议,

 weak var delegate: HandleMapSearch?
Run Code Online (Sandbox Code Playgroud)

但是xcode向我显示错误'weak' must not be applied to non-class-bound 'HandleMapSearch'; consider adding a protocol conformance that has a class bound。之前运行良好,但现在运行应用程序时显示此错误。这是做什么用的,我该如何删除该错误?这就是我在VC类中创建协议的方式。

protocol HandleMapSearch {
func dropPinZoomIn(placemark:MKPlacemark)
}
Run Code Online (Sandbox Code Playgroud)