I created a 3D cube in iphone using CALayer's . Now I wanted to rotate this cube ( CALayer ) 90Λ when the user double-clicks on it.
I managed to rotate this cube ( CALayer ) up to 90Λ once, but when I double-click the cube ( CALayer ), it does not rotate.
Here is the code I used to rotate the cube ( CALayer )
CATransform3D x = CATransform3DRotate(currentLayer.sublayerTransform, M_PI / 2, 0, 0, 1); currentLayer.transform = x;
Can anyone help with this. What am I doing wrong.
PS. For people who are wondering how I got a degree sign, here's the trick
Option + K
source share