Need Help for WKInterfaceTable

189 views Asked by At

I am using WKInterfaceTable. In Table's Group I have label with heigth set dynamic. When Table's Group set height sizeToFit Content. ScrollToRowAtIndex method is not working properly.

2

There are 2 answers

0
rmp On

You should not place a Table inside a Group, as it will cause the issues you are experiencing.
Apple Docs:

Don’t embed tables inside groups. Tables resize dynamically based on the number of rows they contain; they ignore height restrictions placed on them by groups.

0
error 404 On

According to apples documentation you should use ScrollToRowAtIndex. "Table's Group set height sizeToFit Content" its not the problem. I faced the same issue and it seems like a bug, but with dispatch_async it worked just fine.

dispatch_async(dispatch_get_main_queue(), ^{  
    [self.table scrollToRowAtIndex:yourRowHere];  
});