【发布时间】:2013-02-07 06:12:48
【问题描述】:
在我的游戏中,我将 UIImageview 旋转到 30 度,我需要转换旋转后的 UIImageview 的 CGRect,请有人帮我提供示例代码。
UIImageView *mainImgB = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, width, hight)];
[mainImgB setBackgroundColor:[UIColor greenColor]];
mainImgB.layer.anchorPoint = CGPointMake(0, 0);
mainImgB.center = CGPointMake(View.frame.size.width/2, View.frame.size.height/2);
mainImgB.transform = CGAffineTransformRotate(mainImgB.transform,30 * M_PI/180);
谢谢
【问题讨论】:
标签: ios objective-c xcode cgrect