Rotating UIButton

后端 未结 4 1055
攒了一身酷
攒了一身酷 2021-01-20 11:33

I\'ve been trying to rotate a button using the following method:

-(IBAction)rotate:(id)sender{
    CGPoint pencilCenter = pencil.center;
    [pencil setCente         


        
4条回答
  •  情话喂你
    2021-01-20 12:31

    Try using CGAffineTransformRotate instead of CGAffineTransformMakeRotation. You can use `CGAffineTransformIdentity1 as the first argument in all calls, so the final transform according to second argument will be applied on the original shape(?) of the frame.

提交回复
热议问题