【发布时间】:2010-12-16 07:19:20
【问题描述】:
我想在应用了变换旋转后获取 UIView 的当前位置。我该怎么做?
在 UIView 文档中,我发现了有关转换属性的信息:
"如果该属性不是恒等变换,则 frame 属性的值是未定义的,因此应该被忽略。"
我尝试使用 center 和 bounds 但结果被翻译(即使没有对旋转视图应用任何变换)
newView.center = rotatedView.center;
newView.bounds = rotatedView.bounds;
newView.transform = rotatedView.transform;
有人可以帮忙吗?
提前致谢,文森特。
【问题讨论】: