2011-07-06 98 views

回答

1
+0

我不想旋转图像视图我需要旋转iamge比保存 – Harshal

+0

检查更新,我想,你想最后一个环节;) –

1
CGSize size = sizeOfImage; 
UIGraphicsBeginImageContext(size); 
CGContextRef ctx = UIGraphicsGetCurrentContext(); 
CGContextRotateCTM(ctx, angleInRadians); 
CGContextDrawImage(UIGraphicsGetCurrentContext(), 
    CGRectMake(0,0,size.width, size.height), 
    image); 

UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 
UIGraphicsEndImageContext(); 
return image; 
+0

可以请让我知道什么将会在foll: sizeOfImage image(在cgrectmake) – Harshal

+0

你应该声明来源你复制。 http://stackoverflow.com/questions/917713/uiimage-rotation-custom-degrees/918794#918794。 –

1

您可以使用imageWithCGImage:scale:orientation:(从4.0)