Developer
Developer

Reputation: 61

How to set only expanded mode in Today Widget Extension?

There are two widget display modes in iOS 10: NCWidgetDisplayModeCompact and NCWidgetDisplayModeExpanded . The first is enabled by default. How can I enable the default second, but do not show the "show more" / "show less" buttons? In the application "Vidgets" this is implemented.enter image description here

Upvotes: 4

Views: 1631

Answers (1)

TagTaco
TagTaco

Reputation: 143

You cannot hide the Show less / Show more button if you set the display mode to expanded.

However, if you set the widget largest available display mode to compact, it should hide it:

self.extensionContext?.widgetLargestAvailableDisplayMode = .compact

Upvotes: 2

Related Questions