美文网首页
Argument type 'NSObject ->

Argument type 'NSObject ->

作者: 半江瑟瑟 | 来源:发表于2017-09-07 10:24 被阅读67次

Argument type 'NSObject -> () -> xxx你的类名' does not conform to expected type 'AnyObject'

原因是在成员变量里面addTarget self

分析: 先执行成员变量创建,才得到完整的self,写到里面self还不完整,编译器不能认识他是AnyObject
解决方法是写到外面不要写到 成员变量里面

相关文章

网友评论

      本文标题:Argument type 'NSObject ->

      本文链接:https://www.haomeiwen.com/subject/fjobjxtx.html