I want to rotate image (UIImageView) from particular side (for ex. Right Side).
I know through :-
float degrees = 20; //the value in degrees
imageView.transform = CGAffineTransformMakeRotation(degrees * M_PI/180);
but it rotates from center.
I want to rotate my UIImageView from one particular side (i.e. Left side will be at its place, and right side
Anonymous User
12-Nov-2014Try to use anchorPoint property.
imageView.layer.anchorPoint = CGPointMake(0, 0);//Top left angle
float degrees = 20; //the value in degrees
imageView.transform = CGAffineTransformMakeRotation(degrees * M_PI/180);
Do not forget to add QuartzCore framework.