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!
精彩评论