What is the benefit or purpose to change the CALayer
position
, which is by default in center, don't it suppose to be a center of CALayer
? Whats the point changing a center point to bottom right or any other, because bottom right can't be the center of a square.
Asked
Active
Viewed 1,540 times
3

S.J
- 3,063
- 3
- 33
- 66
1 Answers
3
It's helpful for things like rotation where you may want to rotate around a particular point instead of the center

psobko
- 1,548
- 1
- 14
- 24
-
1but for rotation etc its the anchor point which handle these but what is position for? – S.J Sep 15 '15 at 12:48
-
1Since you can't animate a frame property with Core Animation, position changes are a way to animate movement of the layer around the screen without transforms. In terms of anchor point, they're both related to each other so changing the anchor point will change the position of the layer and you need to compensate. Check out this answer for more detail: http://stackoverflow.com/questions/1968017/changing-my-calayers-anchorpoint-moves-the-view – psobko Sep 15 '15 at 14:33