Contents

ModifierBase

A type to use as a base for modifier completions.

Declaration

associatedtype ModifierBase = Any

Discussion

To verify that the completion for a modifier compiles, you specify modifiers as they apply to some base type. Since most modifiers can modify any SwiftUI view, you typically specify any concrete implementation of the View protocol for ModifierBase. However, some modifiers apply to more specific types, like Image or Text, or to an entirely different type like Shape.

See Also

Adding Modifiers