How to “rotate” a layer/view (e.g. just like you would in enigmo)

前端 未结 4 1243
栀梦
栀梦 2021-02-04 11:54

I know how to move a layer based on touch. But I would also like to be able to rotate the image.

Is there any sample code that shows how to do this? Or can anyone give

4条回答
  •  余生分开走
    2021-02-04 12:40

    You should look at Apple's MoveMe example for how to move around a layer based on touch. It also applies some scaling transforms as you do it, so that should serve as a reasonable example of to apply rotation transforms.

提交回复
热议问题