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

前端 未结 4 1223
栀梦
栀梦 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:33

    You would use the view's transform property. There's some example code for rotating the view in the iPhone OS Programming Guide, under Launching in Landscape Mode

提交回复
热议问题