'Existing ivar 'delegate' for unsafe_unretained property 'delegate' must be __unsafe_unretained

前端 未结 6 775
谎友^
谎友^ 2020-12-25 11:30

I\'m getting the error above, but unsure how to go about fixing it. This is my code:

.h:

#import 

@protocol ColorLineDelegate &         


        
6条回答
  •  -上瘾入骨i
    2020-12-25 11:31

    Use this syntax:

    @interface SomeClass  : NSObject {
        id  __unsafe_unretained  delegate;
    }
    @property (unsafe_unretained) id  delegate;
    

提交回复
热议问题