Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我见过旋转UIImageView触摸的例子。我有一个案例,我应该UIImageView在滚动UIScrollView. UIImageView 是UIScrollView. 对此有何建议?
UIImageView
UIScrollView
将委托设置为滚动视图并调用此方法:
– scrollViewWillBeginDragging:
在里面旋转imageview:
imgView.transform = CGAffineTransformMakeRotation(1.57079633); //90 degrees
然后在
– scrollViewDidEndDecelerating: imgView.transform = CGAffineTransformMakeRotation(-1.57079633); //90 degrees