我想将+旋转成为x,但它不会通过+的中心旋转。如何通过这一点让它旋转?
答案 0 :(得分:2)
如你所知,只需旋转标签:)
CGAffineTransform rotare = CGAffineTransformMakeRotation(45*M_PI/180.0f);
[plusLabel setTransform:rotare];
如果标签没有围绕+中心旋转,请包括QuartzCore并旋转[plusLabel图层]
CATransform3D rotate3D = CATransform3DMakeRotation(45*M_PI/180.0f, 0, 0, 1);
[[plusLabel layer] setAnchorPoint:CGPointMake(0.4, 0.6)]; // The center of Plus in my case
[[plusLabel layer] setTransform:rotate3D];