New location for widgets -First introduced in iOS 14, added to Lock Screen iOS 16
New locations are Desktop on Mac, iPad lock screen, standby Mode on Phone, stack mode on WatchOS
Transition oto content margins
- Padding automatically applied to prevent getting to close to the edges. This replaces safe area … .contentMarginsDisabled() will do like ignore safe area.
Add a removable background to widgets
- You need to remove for background for Lock Screen, etc.
- Add containerBackground(for: .widget) { // your original color here in the closure }
- Smart Stack will use this approach.
- If you have no background to remove (or one that doesn’t make sense) you .containterBackgroundRemovable(false)
Dynamically adjust layout
- Change layout when background is removed, this is good for reading from far away in standby mode
- Also blends better in Lock Screen.
Prepare for vibrant rendering mode
- This is for Lock Screen mode
- Use .widgetRenderingMode environment variable to see which mode you are in.