How to programmatically rotate the view by 180 degrees on iOS?

后端 未结 7 1053
面向向阳花
面向向阳花 2021-02-04 10:15

How to programmatically rotate the view by 180 degrees in my iPhone App?

7条回答
  •  臣服心动
    2021-02-04 11:14

    Same outcome as @Manny's answer using a different function.

     CGFloat degreesOfRotation = 180.0;
     view.transform = CGAffineTransformRotate(view.transform,
         degreesOfRotation * M_PI/180.0);
    

提交回复
热议问题