I am struggling to set the height animated for the Today Extension when a display mode is changed. I have the following code:
- (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode
withMaximumSize:(CGSize)maxSize
{
if (activeDisplayMode == NCWidgetDisplayModeCompact) {
self.preferredContentSize = maxSize;
}
else {
self.preferredContentSize = CGSizeMake(0, 165);
}
}
It works, however the height of the widget is not animated, it just snaps to the new height. How should I go about doing this?