我想在对UIView进行旋转变换后获取它的当前位置。我该如何做?
在UIView文档中,我找到了有关transform属性的信息:
“如果此属性不是标识变换,则frame属性的值未定义,因此应将其忽略。”
我尝试使用center和bounds替代,但结果被平移了(即使没有应用于旋转视图的变换)。
newView.center = rotatedView.center;
newView.bounds = rotatedView.bounds;
newView.transform = rotatedView.transform;
有人可以帮忙吗?
谢谢,Vincent。