简体   繁体   中英

How do you rotate a UIView in an animation?

我可以为UIView设置大小和位置等的动画。但是如何旋转它呢?

Change its transform matrix...here is a link to the transform property of views transforms

You can use CGAFfineTransforms to set this property, you can either make a new one, or use CGAffineTransformMakeRotation that takes a degree as input, here is a reference to that CGAffineTransforms

hope that helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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