Xcode工程编译错误之iOS开发之Sending '__strong typeof (xxx)' (aka 'xxxx *__strong') to parameter of incompatible type 'id<xxx>'

iphone开发出现警告:

Sending '__strong typeof (xxx)' (aka 'xxxx *__strong') to parameter of incompatible type 'id<xxx>'

如图:

原因是没有在头文件实现相应协议。

解决方法是在头文件(.h文件)中

@interface 一行后面加上 <协议名>

如图:

posted on 2019-02-21 18:14  梁飞宇  阅读(1918)  评论(0)    收藏  举报