简体   繁体   English

带手势识别器的UIImageView Xcode Ios

[英]UIImageView with gestures recognizers Xcode Ios

I have a UIImageView with gestures recognizers (scale, rotate, translate). 我有一个带手势识别器的UIImageView (缩放,旋转,翻译)。

But after using it, the gestures don't work. 但在使用它之后,手势不起作用。

And my UIImageview changes the size and position. 而我的UIImageview改变了大小和位置。

How to fix this issue? 如何解决这个问题?

By default, UIImageViews do not have user interaction enabled. 默认情况下,UIImageViews未启用用户交互。 Try setting your UIImageView's user interaction enabled to "YES": 尝试将UIImageView的用户交互设置为“YES”:

[myImageView setUserInteractionEnabled:YES];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM