Had updated the today's extension for iOS 10 implement the delegate method:
-(void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode withMaximumSize:(CGSize)maxSize
{
if (activeDisplayMode == NCWidgetDisplayModeCompact){
[UIView animateWithDuration:0.25 animations:^{
self.preferredContentSize = maxSize;
[self.view layoutIfNeeded];
}];
}
else if (activeDisplayMode == NCWidgetDisplayModeExpanded){
newHeight = [self getNewWidgetHeight];
[UIView animateWithDuration:0.25 animations:^{
self.preferredContentSize = CGSizeMake(0, newHeight);
[self.view layoutIfNeeded];
}];
}
}
everything work fine. But if I leave the widget in compact mode (with show more option available) and if i rerun/reopen the widget screen and if i tapped on Show More button nothing happens even if the delegate method is triggered. I should press 2 time show more/less until widget starts expanding.
I also receive this error:No active animation block!