I have a problem I ve run into with the UIView
method convertRect: fromView:
method. Here is the situation:
I have an overwritten the UIView
class to create a view that rotates with the user s movement(very similar to the TaskRabbit spinner). To create the rotation, over I added an additional view to my subclassed view, and I rotated that view. The rotated view contains additional subviews that obviously rotate with the rotated subview. The problem is, after the subview has been rotated, I need to find where those additional subviews are, with respect to the original overritten view - not the rotated view. To do this, in my UIView
class, I have the following:
[self convertRect:currentView.frame fromView:rotationView];
然而,当我打印转换的矩形框架时, 坐标并不准确 。 有没有人碰到了 < code> conversect: fromView: 在视图旋转后不准确的问题?
< 强力 > 编辑 < /强 >
具体地说,关于这些要点不准确,我甚至看不到什么应该是什么和什么应该是什么之间的关系,用一个特定的角度,X/y翻转了等等。例如,应该在(25,195)的点在(325.25.25,273.16)处返回(325.25.25,273.16)。