0

WKInterfaceTable类中,有一个方法叫做scrollToRowAtIndex:(NSInteger)index,它只是将指定索引处的行滚动到带有滚动动画的视图中。我知道没有一个方法叫做scrollToRowAtIndex:(NSInteger)index animated:(BOOL)animated,但我想知道是否有解决方法来禁用滚动动画效果滚动表格。在此先感谢。:-]

4

2 回答 2

1

不幸的是,当前版本的 WatchKit 没有办法控制滚动动画。希望我们能在未来的更新中得到类似的东西。

于 2015-05-11T04:51:12.190 回答
1

在 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

于 2015-11-17T08:18:52.713 回答