Created
November 22, 2017 10:55
-
-
Save stfalconaleks/a11453dbb2ae0f9f552596abbf370d15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func widgetActiveDisplayModeDidChange(_ activeDisplayMode: NCWidgetDisplayMode, withMaximumSize maxSize: CGSize) { | |
if activeDisplayMode == .compact { | |
self.preferredContentSize = maxSize | |
} else if activeDisplayMode == .expanded { | |
self.preferredContentSize = CGSize(width: maxSize.width, height: 150) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment