关于子类和父类具有相同属性的问题

如果父类中有delegate属性,并且子类中也具有同名的属性,那么会报一下警告⚠️。解决办法:在.m文件中添加:@dynamic delegate;具体请搜索动态绑定。如下图:

// Auto property synthesis will not synthesize property 'delegate'; it will be implemented by sit superclass,use @dynamic to acknowledge intention

posted @ 2016-09-05 18:27  oneSong  阅读(3233)  评论(0编辑  收藏  举报