开发者

In my Application i want to perform Scaling and Translation together?

i want to perform Scal开发者_如何学编程ing and Translation of image together so how its possible?


Just make the new opposite corners of your image the two detected multitouch points. You have to keep either the rotation or the aspect ratio fixed, of course. (In theory, you could mess with the aspect ratio rather than the rotation, but you probably want the rotation to change, not the aspect ratio).

i.e. Override the touchesBegan and touchesMoved to save the initial points (in the began) and calculate rotation, translation and zoom (in the Moved), and construct a CGAffineTransform to apply to the imageView.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜