【发布时间】:2012-11-28 00:22:10
【问题描述】:
我有一个subview,它是UIImageView,我有一个superview - uiview。
我将子视图添加到超级视图。一开始,我使用代码移动子视图:
float difx = [[touches anyObject] locationInView:subview].x - [[touches anyObject] previousLocationInView:subview].x;
float dify = [[touches anyObject] locationInView:subview].y - [[touches anyObject] previousLocationInView:subview].y;
subview.transform = CGAffineTransformTranslate(subview.transform, difx, dify);
而且它移动得很好!(它朝着手指光标移动)。
但如果我旋转超级视图,使用代码:
superview.transform = CGAffineTransformMakeRotation(degreesToRadians(angle));
此时,子视图不正确,不对! (它不会向手指光标移动)?
【问题讨论】:
标签: iphone uiimageview rotation subview