I have created a 3D cube in iphone using CALayer's
. Now I wanted to rotate that cube(CALayer
) at 90˚
when user double taps on it.
I was able to rotate that cube(CALayer
) to 90˚
once but when I double tap the cube(CALayer
) is not rotating.
Here is the code that I used to rotate the cube(CALayer
)
CATransform3D x = CATransform3DRotate(currentLayer.sublayerTransform, M_PI / 2, 0, 0, 1);
currentLayer.transform = x;
Can anyone help in this. What I'm doing wrong.
PS. For the people who are wondering how I got the degree sign then here is the trick
Option + K