ios - Rotate view on y,z axis simultaneously from one of it's End -
hi guys trying rotate view on y,z axis successful next code want rotate on end, rotating centre, searched , got anchorpoint
property of layer create rotate makes unwanted translation of view not working
leftdoorview.layer.anchorpoint = cgpointmake(0.5,0); // code rotate view on y axis , 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 want create menu effect taasky app help appreciated
perhaps ray wenderlich tutorial taasky menu can help. "adding perspective menu" section.
for farther info animations, there documentation provided apple , nice anchor point explanation david ronnqvist.
ios objective-c iphone uianimation catransform3d
No comments:
Post a Comment