scrollToRowAtIndexPath

scrollToRowAtIndexPath

本文介绍了当UITableView完成滚动时,是否可以通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我引用了此问题:



UITablewView是UIScrollView的子类,我的UITableView委托获得



但是,当我调用<$ c $($)时,会弹出一个(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView c> - (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated 滚动表,我没有得到 scrollViewDidEndDecelerating 消息。我使用 animated:YES 调用 scrollRowToIndexPath ... 方法。

这是一个错误/ API限制(在iPhone SDK 3.1.3上),或者我缺少另一种方法来做这个?

解决方案

为了防止有人继续追踪这个文件,Apple文档在 scrollToRowAtIndexPath:atScrollPosition:animated:文档中说:


I referenced this question: How to detect when a UIScrollView has finished scrolling

UITablewView is a subclass of UIScrollView, and my UITableView delegate does get the - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView message when I scroll the table by hand.

However, when I call - (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated to scroll the table, I don't get the scrollViewDidEndDecelerating message. I am calling the scrollRowToIndexPath... method with animated:YES.

Is this a bug/API limitation (on iPhone SDK 3.1.3) or am I missing another way to do this?

解决方案

Just in case someone is still chasing this one, the Apple docs say the following under the scrollToRowAtIndexPath:atScrollPosition:animated: documentation:

这篇关于当UITableView完成滚动时,是否可以通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 06:40