相关疑难解决方法(0)

React Native ListView:如何滚动到特定行

在NativeiOS中,您可以使用以下命令将UITableView滚动到特定的UITableViewCell:

[tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:87 inSection:0] 
         atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
Run Code Online (Sandbox Code Playgroud)

..或类似的.

例如,如果ListView持有100个项目,我想滚动使第87个项目可见.

看看React Native ListView文档,没有什么明显的.

有没有人设法实现这一目标?我意识到ListView没有包装UITableView所以我们不能只公开该方法.

编辑:看起来有一些支持这是在0.19-rc版本,检查这个https://github.com/facebook/react-native/releases

https://github.com/facebook/react-native/commit/33e05a11f00d1455f39b6dfef1c76c4130df02e5

react-native

5
推荐指数
1
解决办法
6481
查看次数

标签 统计

react-native ×1