How to use CGAffineTransformMakeRotation?

前端 未结 2 1438
失恋的感觉
失恋的感觉 2020-11-30 04:44

\"enter

I want to draw text use Quartz 2D. The \"menu\" direction is wrong. I want \"M

2条回答
  •  不知归路
    2020-11-30 05:35

    CGAffineTransformMakeRotation expects angle in radians, not in degrees.

    #define DEGREES_TO_RADIANS(x) (M_PI * (x) / 180.0)
    ...
    
    CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(45));
    

提交回复
热议问题