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.
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)