@strongify(self.delegate); not working
Ricardo1980 opened this issue · comments
Hello mates!
I receive:
"/WAMOverviewView.m:306:10: Weak property 'delegate' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive"
I try ti use
@strongify(self.delegate);
Or
@strongify(self->_delegate);
but I receive:
"WAMOverviewView.m:304:16: Redefinition of 'self' with a different type: 'id _Nullable __strong' vs 'WAMOverviewView *const __strong' "
Any idea or suggestion? Thanks a lot.
Apart from that, in other parts of the program I tried to use
@strongify(self, self.delegate) but doesn't work.
Am I missing something?
Thanks.
Looks like weakify/strongify does not support dot-separated identidiers, try:
@weakify(_delegate)
self.delegate
is not a variable, but a statement