This question is similar to this SO question. But since it does not address my issue completely, I am asking another one.
Suppose I have a CGRect
property myRect
.
I see that self.myRect.origin = CGPointMake(x,y);
does not work (not assignable)
but _myRect.origin = CGPointMake(x,y);
works.
I think it is because self.myRect
is converted to a call to the accessor and so it does not get translated to what we want [self setMyRect:CGRect(x,y,width,size)]
. How does the compiler translate the self.myRect.origin = CGPointMake(x,y);
statement?