Sol*_*d I 2 xcode objective-c uitableview nsindexpath ios
我使用以下代码滚动到tableView的顶部:
NSIndexPath *topIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.listTableView selectRowAtIndexPath:topIndexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
Run Code Online (Sandbox Code Playgroud)
它工作得很好,但我想避免目标行被"选中".见下图:

关于如何在此代码运行后"取消选择"行的任何想法?或者更好的是,以不首先"选择"目标行的方式运行此代码?
[self.listTableView scrollToRowAtIndexPath:topIndexPath
atScrollPosition:UITableViewScrollPositionTop animated:YES];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7938 次 |
| 最近记录: |