selectRowAtIndexPath:animated:scrollPosition:-行被“选择”
我使用以下代码滚动到 tableView 的顶部:
NSIndexPath *topIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.listTableView selectRowAtIndexPath:topIndexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
它效果很好,但我想避免“选择”目标行。请参见下图:
有关如何在此代码运行后“取消选择”行的任何想法?或者更好的是,以一种不首先“选择”目标行的方式运行此代码?
I am using the following code to scroll to the top of a tableView:
NSIndexPath *topIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.listTableView selectRowAtIndexPath:topIndexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
It works great, but I'd like to avoid the target row from being "selected". See image below:
Any ideas on how to "deselect" the row after this code runs? Or better yet, run this code in a way that doesn't "select" the target row in the first place?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)