如何在WKInterfaceTable中实现scrollToRowAtIndex:animated:方法

How to implement scrollToRowAtIndex:animated: method in WKInterfaceTable

WKInterfaceTableclass中,有一个方法叫scrollToRowAtIndex:(NSInteger)index,它只是将指定索引处的行滚动到视图中,滚动animation.I知道没有'一个名为 scrollToRowAtIndex:(NSInteger)index animated:(BOOL)animated 的方法,但我想知道是否有一种解决方法可以在提前滚动 table.Thanks 时禁用滚动动画效果。 :-]

很遗憾,当前版本的WatchKit无法控制滚动动画。希望我们在未来的更新中能得到这样的东西。

在 WatchKit 2.0 中,TableView 有一个方法可以滚动到您想要的行。

table.scrollToRowAtIndex(0)

https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceTable_class/#//apple_ref/occ/instm/WKInterfaceTable/scrollToRowAtIndex: