繁体   English   中英

触摸滚动视图时UIImageView旋转-iOS

[英]UIImageView rotation on touching a scrollview - iOS

我看到了在触摸时旋转UIImageView示例。 我有一种情况,我应该在滚动UIScrollView旋转UIImageView UIImageView是UIScrollView的内容。 有什么建议吗?

将委托设置为滚动视图并调用此方法:

– scrollViewWillBeginDragging:

在其中旋转imageview:

imgView.transform = CGAffineTransformMakeRotation(1.57079633); //90 degrees

然后将其设置回

– scrollViewDidEndDecelerating:

imgView.transform = CGAffineTransformMakeRotation(-1.57079633); //90 degrees

暂无
暂无

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

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