symbolEffectsRemoved

Returns a new view with its inherited symbol image effects either removed or left unchanged.

View ModifieriOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+symbolEffectsRemoved(_:) in SwiftUI

Declaration

React
compose().symbolEffectsRemoved(isEnabled?: boolean)
Swift
@export(implementation) nonisolated func symbolEffectsRemoved(
    _ isEnabled: Bool = true
) -> some View

Parameters

  • isEnabledboolean

    Whether to remove inherited symbol effects or not.

Return value

a copy of the view with its symbol effects either removed or left unchanged.

Discussion

The following example adds a repeating pulse effect to two symbol images, but then disables the effect on one of them:

VStack {
    Image(systemName: "bolt.slash.fill") // does not pulse
        .symbolEffectsRemoved()
    Image(systemName: "folder.fill.badge.person.crop") // pulses
}
.symbolEffect(.pulse)

See also

More in Text and symbols.