【发布时间】:2013-12-16 16:29:12
【问题描述】:
这是一个非常奇怪的错误。我会尽力解释它,但我制作了一个视频给你看(见下文)
有时当我们推送到导航控制器上的 tableview 时,滚动行为如下:
问题视频在这里: http://tinypic.com/r/30nkyol/5
- 滑动将不起作用。如果你轻弹滚动视图,它不会在你轻弹后继续移动。只要您松开手指,tableview 就会停在原处。
- tableview 不反弹。正因为如此,您可以超越通常的界限。
就好像 decelerationRate 以某种方式设置得非常高,以至于滚动视图在被触摸后立即下降。
退出应用并重新启动可解决此问题。此外,我们在单独的视图控制器上还有另一个 tableview 并且转到该 tablieview 从来没有遇到过问题。
我想知道你是否见过这个问题?还是这是 iOS 现象?
我们的 cellforrowatindexpath:
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
SPMark* mark = self.datasource[indexPath.section];
NSString* reuseId = [SPHomeViewController cellIdentifierFromData:mark];
SPTableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:reuseId];
if (cell == nil) {
cell = [SPTableViewCell cellFromMark:mark reuseID:reuseId];
[cell updateView:NO];
}
[cell addDataToCell:mark];
if (indexPath.section >= self.datasource.count - 2 && !self.isLoadingData && self.pageNumber != -1)
self.fetchNextPage = YES;
NSLog(@"SUBVIEWS: %d", self.view.subviews.count);
return cell;
}
【问题讨论】:
-
共享代码是必要的。没有它,我们只能猜测。显示您认为相关的代码部分。如果需要更多,有人会问。
标签: ios iphone objective-c uitableview uiscrollview