xcode - Image rotation around the lower right edge iOS -


i trying rotate image around lower right edge.

now rotates around center.

catransform3d transform = catransform3didentity; transform.m34 = 1.0f/-800.0f; // perspective transform = catransform3drotate(transform, (m_pi * 90), 0.0f, 0.0f, 1.0f);  if (animation) {     [uiview animatewithduration:0.9                      animations:^{                          [[_sendrecordview layer] settransform:transform];                      } completion:null]; } else {    [[_sendrecordview layer] settransform:transform]; } 

you need set this:

[_sendrecordview layer].anchorpoint = cgpointmake(x, y); 

where x , y desired lower right edge point.

edit: default view spins around center because anchorpoint in position.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -