2
我想允许通过点击UITableView
侧的sectionIndexTitles
来滚动我的UITableView
。到目前为止,我的解决方案如下:使用sectionForSectionIndexTitle在UITableView中快速滚动
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
{
NSIndexPath *matchingIndexPathForTitle = [self matchingIndexPathForSectionIndexTitle:title];
if (matchingIndexPathForTitle) {
[tableView scrollToRowAtIndexPath:matchingIndexPathForTitle
atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
return 1;
}
但好像因为iOS9它始终滚动到的UITableView
我可以保证最上面的那matchingIndexPathForTitle
是正确的(例如:第1行22)也改变为animated:NO
并没有什么区别。
你
- 有这种怪异的行为的解释?或
- 有什么建议如何实现iOS 9的快速滚动?