I find this pretty confusing. When you want to rotate a view, it's going to be rotated by it's center point. But that's not always good. So if you need to rotate by an specified origin in your view, you would have to set the anchorPoint property of the view's layer.
Now, the problem is, that this anchorPoint property takes pretty confusing values for the average-intelligent programmer ;)
They're from 0 to 1, as far as I know. Also, the coordinate system is flipped to the view's coordinate system, where I think that 0 is the smallest value in the view's coordinate system, and 1 the largest.
myView.layer.anchorPoint = CGPointMake(0.5, 0.5);
would set the anchorPoint in the middle of the view.
What can I do, if I only know: - my view is 100 x 150 units big - I want the anchorPoint to be at x=100 and y=20, in my view coordinate system
Any idea how to achieve that?