Synthesized property of a protocol not seeing superclass' ivar
- by hyn
I have a situation where my subclass is not seeing the superclass' instance variable x. The ivar is obviously @protected by default, so why do I get a compiler error "x undeclared"?
- (CGSize)hitSize
{
// Compiler error
return size;
}
EDIT: hitSize is a property of a protocol my subclass is conforming to. The problem was that I had hitSize @synthesized, which was the culprit. The question then is why can't the synthesized getter see the ivar?