UIView顺利移动

时间:2011-02-26 10:07:47

标签: iphone cocoa-touch ipad uiview uiscrollview

如果您将使用简单代码移动一些UIView对象:

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

你会看到它在移动时抽搐。但是如果你试图将一些UIView对象移动到UIScrollView中,你会发现它移动得非常顺利。那么,问题是 - UIScrollView如何在里面工作?

提前致谢!

0 个答案:

没有答案
相关问题