hoverEffect(_:isEnabled:)
Applies a hover effect to this view.
Declaration
nonisolated func hoverEffect(_ effect: HoverEffect = .automatic, isEnabled: Bool = true) -> some View
Parameters
- effect:
The effect to apply to this view.
- isEnabled:
Whether the effect is enabled or not.
Return Value
A new view that applies a hover effect to self.
Discussion
By default, automatic is used. You can control the behavior of the automatic effect with the defaultHoverEffect(_:) modifier.