jjzjj

iphone - scrollViewDidEndScrollingAnimation 没有被调用

coder 2024-01-10 原文

我有一个简单的 UIScrollView 和一个 UIPager,每当我滚动 ScrollView 时,我想更改我的寻呼机,但由于某种原因 (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView 没有被打电话。

我的代表正在工作,因为 (void)scrollViewDidScroll:(UIScrollView *)scrollView 正常工作,我是不是忘记了什么?

或者有没有其他方法可以在 ScrollView 滚动时更改 UIPager

最佳答案

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIScrollViewDelegate_Protocol/Reference/UIScrollViewDelegate.html

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/

有关iphone - scrollViewDidEndScrollingAnimation 没有被调用的更多相关文章

随机推荐