[英]How much a UIImageView rotated?
I have an UIImageView that is being pinched, zoomed, rotated, etc. When the user ends transforming the image he presses the DONE button and I have to figure out how much the object was scaled and rotated. 我有一个被捏,缩放,旋转等的UIImageView。当用户结束变换图像时,他按了DONE按钮,我必须弄清楚对象已缩放和旋转了多少。
All I know is the angle and scale of the object before the user started modifying it. 我所知道的是用户开始修改之前对象的角度和比例。 Now I need the new angle and scale.
现在,我需要新的角度和比例。
How to do that? 怎么做? If you can point to a code, it will help.
如果您可以指向一个代码,它将有所帮助。
thanks 谢谢
I suggest to keep a track of all changes made. 我建议跟踪所有所做的更改。 If the user pinches zooms,etc, it means that the app will calculate the rotation and zooming for every touch the user does right?
如果用户捏缩放等,则意味着该应用将为用户每次触摸正确计算旋转和缩放? So, Why don't use the last touch to know the rotation and zoom?
那么,为什么不使用最后的触摸来了解旋转和缩放呢? You could update your zoom and rotation variable every time the user does a touch.
您可以在用户每次触摸时更新缩放和旋转变量。 Regards Ignacio
问候伊格纳西奥
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.