Possible Duplicate:
How do I apply a perspective transform to a UIView?
How to change the perspective, 3D Transform, skew ,distortion, rotation of the image view? Any sample projects for this.Thanks in Advance
Possible Duplicate:
How do I apply a perspective transform to a UIView?
How to change the perspective, 3D Transform, skew ,distortion, rotation of the image view? Any sample projects for this.Thanks in Advance
3D transforms, rotations, skews, etc are usually done with CATransform3D
.
As per the documentation (Core Animation Programming Guide):
The CATransform3D data structure defines a homogenous three-dimensional transform (a 4 by 4 matrix of CGFloat values) that is used to rotate, scale, offset, skew, and apply perspective transformations to a layer.
As an example, to do a 3D rotation towards the bottom right, you would do something like:
myImageView.layer.transform = CATransform3DRotate(CATransform3DIdentity, 1.75, 0.85, 0, 0);
and don't forget to
#import <QuartzCore/QuartzCore.h>
A fantastic sample project is Mark Pospesel's Enter the Matrix. The code is on GitHub, also check out the explanatory slides.