SwiftUI currently does not offer a way to achieve this. It is, however, possible to achieve using SwiftUIX.
- Install SwiftUIX via the Swift Package Manager.
- In your code,
import SwiftUIX
.
- Use
VisualBlurEffectView
with the .intensity(_:)
modifier.
Text("Hello world!")
.background {
VisualEffectBlurView(blurStyle: .systemThinMaterial)
.intensity(0.5)
}
Disclaimer: Both this answer and the question were written to document SwiftUIX (an MIT-licensed open-source package) in a Q/A style format. As of writing this question I am currently not aware of any simple way to achieve this via UIKIt, and will gladly amend the answer to prescribe an official approach if/when one becomes available. I'd also love to just dump the code specific to this component, but it relies on a number of extensions/hacks that are spread across the SPM package that would be impractical to isolate just for the purpose of bundling a copy-paste solution to this answer.