accessibilityIgnoresInvertColors

Sets whether this view should ignore the system Smart Invert setting.

View ModifieriOS 14.0+macOS 11.0+tvOS 14.0+watchOS 7.0+accessibilityIgnoresInvertColors(_:) in SwiftUI

Declaration

React
compose().accessibilityIgnoresInvertColors(active?: boolean)
Swift
nonisolated func accessibilityIgnoresInvertColors(
    _ active: Bool = true
) -> some View

Parameters

  • activeboolean

    A true value ignores the system Smart Invert setting. A false value follows the system setting.

Discussion

Use this modifier to suppress Smart Invert in a view that shouldn't be inverted. Or pass an active argument of false to begin following the Smart Invert setting again when it was previously disabled.

See also

More in Accessibility.