Hi guys I am trying to rotate view on y,z axis I am successful with the following code but I want to rotate this on its end, now it is rotating from centre, I searched and I got anchorPoint
property of layer to make it rotate but it makes unwanted translation of my view also it is not working
leftDoorView.layer.anchorPoint = CGPointMake(0.5,0);
// Code to rotate view on Y axis and slight translate on Z-axis
angle -= 1.57f;
[UIView animateWithDuration:0.5 animations:^{
CATransform3D transloate = CATransform3DMakeTranslation(0, 0, -(leftDoorView.frame.size.width/2.0));
CATransform3D rotate = CATransform3DMakeRotation(angle, 0, 1, 0);
CATransform3D mat = CATransform3DConcat(rotate, transloate);
leftDoorView.layer.transform = CATransform3DPerspect(mat, CGPointMake(0, 0), 500);
}];
For more Info I want to make Menu effect like Taasky app any help will be really appreciated