0

我正在使用 WKInterfaceTable。在 Table's Group 中,我有带有高度集动态的标签。当 Table 的 Group 设置高度 sizeToFit 内容。ScrollToRowAtIndex 方法无法正常工作。

4

2 回答 2

0

您不应该将表放在组内,因为它会导致您遇到的问题。
苹果文档

不要在组内嵌入表格。表格根据其包含的行数动态调整大小;他们无视群体对他们的身高限制。

于 2015-06-15T18:23:04.247 回答
0

根据苹果文档,您应该使用 ScrollToRowAtIndex。“Table's Group set height sizeToFit Content”不是问题。我遇到了同样的问题,它似乎是一个错误,但使用 dispatch_async 它工作得很好。

dispatch_async(dispatch_get_main_queue(), ^{  
    [self.table scrollToRowAtIndex:yourRowHere];  
});
于 2015-12-23T01:56:24.880 回答