I know I can't say myView.frame.origin.x = val - But why ?
Posted
by Allisone
on Stack Overflow
See other posts from Stack Overflow
or by Allisone
Published on 2010-06-06T10:20:27Z
Indexed on
2010/06/06
10:22 UTC
Read the original article
Hit count: 207
I know that I can't use that
myView.frame.origin.x = 25.0;
that I have to use instead
CGRect myFrame = myView.frame;
myFrame.origin.x = 25.0;
myView.frame = myFrame;
And I'm doing it all the time (f.e. in animations), but I don't know why I must do it that way. I would like to fill that gap in my understanding. Can someone explain ?
© Stack Overflow or respective owner