Par*_*att 25 iphone cocoa-touch objective-c image-rotation ios4
可能重复:
如何将UIImage旋转90度?
如何以编程方式在iPhone中将图像旋转90度?
Sab*_*bin 72
//create rect
UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"my_image.png"]];
//set point of rotation
myImageView.center = CGPointMake(100.0, 100.0);
//rotate rect
myImageView.transform = CGAffineTransformMakeRotation(M_PI_2); //rotation in radians
Run Code Online (Sandbox Code Playgroud)
看到这个:
myImage.center = CGPointMake(0, 0);
myImage.transform = CGAffineTransformMakeRotation([degreesToRadians:imageRotationFix]);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
58203 次 |
最近记录: |