Reputation: 11315
I am working on an app with a Today Widget extension. I've seen some widgets, including a sample app from Apple, that display a chevron in the top right to take the user to the app. I've looked through the documentation and sample code and can't figure out how this is added.
The sample app that's downloaded from here has it, but there isn't any information about how to enable it. https://developer.apple.com/documentation/notificationcenter/building_a_simple_widget_for_the_today_view
Does anyone know how to enable this?
Upvotes: 1
Views: 82
Reputation: 9829
You can add the chevron button to your widget by setting the widgetLargestAvailableDisplayMode
of your extension context to .expanded
:
extensionContext?.widgetLargestAvailableDisplayMode = .expanded
(Note that the chevron button does not take you to the app, but rather it toggles between expanded/compact sizes of your widget.)
Upvotes: 2