Declaration
compose().hoverEffectDisabled(disabled?: boolean)nonisolated func hoverEffectDisabled(
_ disabled: Bool = true
) -> some ViewParameters
disabledbooleanA Boolean value that determines whether this view can display hover effects.
Return value
A view that controls whether hover effects can be displayed in this view.
Discussion
The higher views in a view hierarchy can override the value you set on
this view. In the following example, the button does not display a hover
effect because the outer hoverEffectDisabled(_:) modifier overrides
the inner one:
HStack {
Button("Press") {}
.hoverEffectDisabled(false)
}
.hoverEffectDisabled(true)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.
- hoverEffectApplies a hover effect to this view.
- 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.