How to rotate text drawn by Quartz on iPhone

前端 未结 4 741
情歌与酒
情歌与酒 2020-12-30 18:37

I want to draw some texts using Quartz. Now the app draws , but I want it to show as \"0123456789\". Is there any way to show its normal orientation?

Here is my cod

4条回答
  •  死守一世寂寞
    2020-12-30 19:17

    What do you mean, exactly, by "rotate them to the normal mode"?

    Assuming you just mean rotation within a 2D space, you would typically use a transform matrix. Have a look at CGAffineTransformMakeRotation.

    You could apply it to the view itself (by setting the transform property), or to the CG context you have.

提交回复
热议问题