【发布时间】:2013-01-02 20:56:42
【问题描述】:
我有一个手动拖动的滚动视图,现在我希望通过以下代码以编程方式移动滚动视图:
offset = CGPointMake(scrollView.contentOffset.x+320, 0);
[UIScrollView beginAnimations:@"scrollAnimation" context:nil];
[UIScrollView setAnimationDuration:0.5];
[scrollView1 setContentOffset:offset];
[UIScrollView commitAnimations];
它运行良好,但现在不调用函数 scrollViewBeginDragging 和 scrollViewEndDecelerating。 Begindragging 对我来说没问题,但我不知道在以编程方式触发时如何检测 de scrollview 移动的结束。
提前致谢!
【问题讨论】:
-
你试过使用 setContentOffset 动画方法吗? developer.apple.com/library/ios/#documentation/uikit/reference/…
-
我遇到了问题......我不记得它是什么,我最终这样做了。
标签: iphone ios xcode uiscrollview scroll