I have a UIImageView which gets rotated. When it rotates to the point where it is 90° to the user, it is obvious that the view doesn’t have any depth to it. Like looking at a piece of paper at 90°.
I am using:
// Rotate
CATransform3D rotationAndPerspectiveTransform2 = CATransform3DIdentity;
rotationAndPerspectiveTransform2.m34 = 1.0 / -400;
rotationAndPerspectiveTransform2 = CATransform3DRotate(rotationAndPerspectiveTransform2, M_PI, 1.0f, 0.0f, 0.0f);
How could I add some depth to my view so that when it hits 90° it has an edge more like a 3D object rather than a flat view?
You can set up a 3D layer tree in CA by positioning them in 3D space, with one layer per side. So, a 3D rotating cube would have 6 layers; one for each face.
If you make all those layers children of a CATransformLayer (T), you can apply a single transform to T, to, for example, rotate the entire structure in 3D space.
There is no way to “extrude” a CALayer.