如何将子视图旋转x度? [英] How do I rotate a subview x degrees?

查看:60
本文介绍了如何将子视图旋转x度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想将子视图旋转x度(或至少90度).我希望子视图围绕子视图的右下角旋转.是否可以像下面的图片那样对此进行动画处理?

So I want to rotate a subview x degrees (or at least 90 degrees). I want the subwiew to rotate around the subview's bottom right corner. Is it possible to do this animated like in the picture below?

谢谢!

推荐答案

CGAffineTransform transform = 
    CGAffineTransformMakeRotation(angle);

yourSubView.transform = transform;

这篇关于如何将子视图旋转x度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆