My Today extension
is editable, so the user can change what is visible in the widget. The problem I am having is that usually after adding adding new elements to the widget
, the widget becomes unresponsive. To make it work again I have to close the notification center and re-open it.
The data is correctly added to the tableview
and it updates just fine.
After the user has made a change to the widgets via the containing app, I send an update request using MMWormHole
and it arrives to the widget
. Then I call this code:
[self.wormHole listenForMessageWithIdentifier:@"updateSceneWidget" listener:^(id _Nullable messageObject) {
[[WidgetManager getInstance]updateWidgetsData];
[self.tableView reloadData];
[self setPreferredContentSize:self.tableView.contentSize];
}];
Ah, this seems to have something to do with the device being debugged. When it is run normally it doesn't seem to be a problem at all.