Just adding the answer to David: To get the result, as in your image, you need to rotate the view around the x axis (horizontal axis) so that the top edge of the view rectangle is displayed "farther" from the viewer than the bottom edge, for example
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; rotationAndPerspectiveTransform.m34 = 1.0 / -200; rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, 45.0f * M_PI / 180.0f, 1.0f, 0.0f, 0.0f); layer.transform = rotationAndPerspectiveTransform;
source share