View ModifieriOS 13.4+tvOS 16.0+visionOS 1.0+
Overloads
3 ways to call compose().hoverEffect(). Each is one SwiftUI overload, picked by the arguments you pass.
compose().hoverEffect(effect?: SwiftUI.HoverEffect)nonisolated func hoverEffect(
_ effect: HoverEffect = .automatic
) -> some ViewParameters
effectSwiftUI.HoverEffectThe effect to apply to this view.
Return value
A new view that applies a hover effect to self.
Discussion
By default, HoverEffect.automatic is used. You can control the
behavior of the automatic effect with the
View.defaultHoverEffect(_:) modifier.
See also
More in Gestures and input.
- defaultHoverEffectSets the default hover effect to use for views within this view.
- defersSystemGesturesSets the screen edge from which you want your gesture to take precedence over the system gesture.
- dragConfigurationConfigures a drag session.
- dragContainerA container with draggable views. The drag payload is identifiable. To form the payload, use the identifier of the dragged view inside the container.
- dragContainerSelectionProvides multiple item selection support for drag containers.
- gestureAttaches a gesture to the view with a lower precedence than gestures defined by the view.
- handGestureShortcutAssigns a hand gesture shortcut to the modified control.
- highPriorityGestureAttaches a gesture to the view with a higher precedence than gestures defined by the view.
- hoverEffectDisabledAdds a condition that controls whether this view can display hover effects.
- presentationDragIndicatorSets the visibility of the drag indicator on top of a sheet.
- simultaneousGestureAttaches a gesture to the view to process simultaneously with gestures defined by the view.