Contents

symbolEffectsRemoved(_:)

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

Declaration

nonisolated func symbolEffectsRemoved(_ isEnabled: Bool = true) -> some View

Parameters

  • isEnabled:

    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

Managing symbol effects