我想在UIImage
中轮换drawInRect
。{
我有四个UImageView
个对象,其中第二个和第三个的旋转度为 100度且 250度分别
那么有谁能告诉我如何旋转那些UIImageView
内的图像?
答案 0 :(得分:0)
我希望它可以帮助您解决问题,
如果要保持250度旋转100度,请用250度替换100度。
100度
(UIImageview *).transform = CGAffineTransformMakeRotation(1.744);
250度
(UIImageview *).transform = CGAffineTransformMakeRotation(4.36);
此代码符合您的要求
UIGraphicsBeginImageContext( newSize );
[bottomImage drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
//I want Rotation for second and third Image//
[secondImage drawInRect:CGRectMake(0, 0, 110, 300)];
secondImage.transform = CGAffineTransformMakeRotation(1.744);
[thirdImage drawInRect:CGRectMake(0, 0, 110, 300)];
thirdImage.transform = CGAffineTransformMakeRotation(4.36);
[fourthImage drawInRect:CGRectMake(0,0,fourthImage.size.width ,fourthImage.size.height )];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();