简体   繁体   English

UIImageView旋转了多少?

[英]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.

相关问题 如何在旋转的UIView上进行抗锯齿(不是UIImageView) - How to do antialiasing on a rotated UIView (NOT UIImageView) 旋转 UIImageView touchLocationInView 不正确 - Rotated UIImageView touchLocationInView not correct UIImageView:旋转和缩放。 如何保存结果? - UIImageView: Rotated and Scaled. How do I save the results? 如何从iOS中旋转,缩放和倒置的UIImageView中提取UIImage - How to extract the UIImage from rotated, scaled and inverted UIImageView in iOS 如何从旋转的UIImageView获取UIImage的确切边界框 - How to get the exact bounding box of UIImage from rotated UIImageView 如何在旋转和缩放的UIImageView中替换图像? - How do I replace an image in a rotated and scaled UIImageView? 检索旋转的UIImageView的所有4个坐标 - Retrieving all 4 coordinates of a rotated UIImageView 旋转后如何获取UIImageView右上角的坐标? - How do I get the coordinates for the top right corner of a UIImageView after it's been rotated? 如何从UIImageView以全分辨率获得旋转,缩放和平移图像? - How to get a rotated, zoomed and panned image from an UIImageView at its full resolution? 将iOS Swift图像加载到UIImageView时旋转 - IOS Swift Image rotated when loaded into UIImageView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM