Adds a luminance to alpha effect to this view.
- iOS 13.0+Beta
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
luminance modifier creates a semitransparent mask out of the view you apply it to. The dark regions in a view become transparent, and the bright regions become opaque black. Medium brightness regions become a partially opay gray color.
The following shows two versions of the same image side by side; at left is the original, and at right is a duplicate with the
luminance modifier applied:
Returns: A view that applies a luminance to alpha effect to this view.