Iphone 旋转UIImageView后更改缩放UIImageView
在我的图片中使用了新的比例,然后我应用了旋转,然后比例图像变为旧的比例Iphone 旋转UIImageView后更改缩放UIImageView,iphone,ios,objective-c,rotation,scale,Iphone,Ios,Objective C,Rotation,Scale,在我的图片中使用了新的比例,然后我应用了旋转,然后比例图像变为旧的比例 -(void)rotate:(UIRotationGestureRecognizer *)rotationRecognizer{ double rotation; rotation=rotationRecognizer.rotation; ((UIImageView*)[rotationRecognizer view]).transform = CGAffineTransformMakeRotatio
-(void)rotate:(UIRotationGestureRecognizer *)rotationRecognizer{
double rotation;
rotation=rotationRecognizer.rotation;
((UIImageView*)[rotationRecognizer view]).transform = CGAffineTransformMakeRotation(rotation);
self.photoParent = [self.pictures objectAtIndex:0];
self.photoParent.rotation =[NSNumber numberWithDouble:rotation];
NSLog(@"rotation%@",self.photoParent);
}
看看我的答案
应用“Make..”变换将删除以前应用的任何变换。您需要使用累积形式,cGraffineTransformRotate