开发者

UIView smooth moving

If you will move some UIVi开发者_如何学运维ew object with simple code:

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
int stepInt = [[touches anyObject] locationInView:self].x - [[touches anyObject] previousLocationInView:self].x;
_subView.left += stepInt;}

You will see that it twitches while moving. But if you try to move some UIView object placed into UIScrollView, you will see that it's moving very smoothly. So, the question is - how UIScrollView works inside?

Thanks in advance!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜