我有一个简单的 UIScrollView 和一个 UIPager,每当我滚动 ScrollView 时,我想更改我的寻呼机,但由于某种原因 (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView 没有被打电话。
我的代表正在工作,因为 (void)scrollViewDidScroll:(UIScrollView *)scrollView 正常工作,我是不是忘记了什么?
或者有没有其他方法可以在 ScrollView 滚动时更改 UIPager?
最佳答案
The scroll view calls this method at the end of its implementations of the UIScrollView and setContentOffset:animated: and scrollRectToVisible:animated: methods, but only if animations are requested.
以下两种方法调用才会起作用。必须是动画值是 YES。
[myScrollView setContentOffset:<#(CGPoint)#> animated:YES];
[myScrollView scrollRectToVisible:<#(CGRect)#> animated:YES];
关于iphone - scrollViewDidEndScrollingAnimation 没有被调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11980534/