Updated today's extension for iOS 10 to implement the delegation 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 is working fine. But if I leave the widget in compact mode (if there are more options), and if I re-run / close the widget screen, and if I clicked the "Show more" button, nothing will happen even if the delegate method is initiated. I have to click 2 times more / less until the widget starts expanding. I also get this error: No active animation block!
source share