Reputation: 85
Maybe I'm doing something wrong but if I call removeRowsAtIndexes:
on a WKInterfaceTable
instance like so:
NSIndexSet *indexes = [[NSIndexSet alloc] initWithIndex:index];
[self.table removeRowsAtIndexes:indexes];
Should the table not update? Logging the numberOfRows
reported by the table shows the number correctly reduced by 1, but on screen nothing changes.
Trying to select a row after this point can actually result in selecting the row below, so clearly the table has recorded the deletion but at least in the simulator it isn't showing. Has anyone else expereinced this? Is this a bug or do I need to force the table to refresh somehow?
Upvotes: 2
Views: 565
Reputation: 66
Your class must be fully loaded before you calling removeRows AtIndexes. (when watch interface is visible to user).
- (void)willActivate {
[super willActivate];
NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:index];
[self.table removeRowsAtIndexes:indexes];
}
At what point did you call the method removeRowsAtIndexes in your code ?
Upvotes: 4