PSA: If your app has home screen widgets, they will most likely require some extra work to appear correctly on iOS 18 in the tinted mode. (thread)
PSA: If your app has home screen widgets, they will most likely require some extra work to appear correctly on iOS 18 in the tinted mode. (thread) 2 comments
To quickly convert from a view's color to opacity, you can add the .luminanceToAlpha() view modifier. The problem is that it will change the opacity even in normal (non-tinted) mode. So I created a custom view modifier that only applies this filter if we're in the tinted mode. |
The difference between the vibrant appearance from last year (iOS widgets on the macOS desktop) is that for the tint mode, the opacity of views is used to render the widget.
You can use the \.widgetRenderingMode environment variable and check for '.accented' to detect this mode.