SwiftUI has a helpful ViewModifier called brighten, does anyone know how to do the opposite and darken a view? I'd hoped passing in a negative value would do the trick, but that doesn't work.
For darken the View, You can give negative value to brightness modifier like this,
MyView().brightness(-0.5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With