<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIHoverStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIHoverStyle"
  },
  "title" : "UIHoverStyle"
}
-->

# UIHoverStyle

The hover style to apply to a view, including an effect and a shape to use for displaying that effect.

```
@MainActor class UIHoverStyle
```

## Topics

### Creating a hover style

[`init(effect:shape:)`](/documentation/UIKit/UIHoverStyle/init(effect:shape:))

Creates a hover style with the provided effect and shape.

[`init(shape:)`](/documentation/UIKit/UIHoverStyle/init(shape:))

Creates a hover style with the provided shape and an automatic hover effect.

[`+  styleWithShape:`](/documentation/UIKit/UIHoverStyle/styleWithShape:)

Creates a hover style with the provided shape.

[`+  styleWithEffect:shape:`](/documentation/UIKit/UIHoverStyle/styleWithEffect:shape:)

Creates a hover style with the provided effect and shape.

[`+  automaticStyle`](/documentation/UIKit/UIHoverStyle/automaticStyle)

Creates an automatic hover style.

### Specifying a hover shape

[`shape`](/documentation/UIKit/UIHoverStyle/shape-21npk)

The shape to use for the hover effect.

[`UIShape`](/documentation/UIKit/UIShape-swift.struct)

An abstract representation of a shape.

[`shape`](/documentation/UIKit/UIHoverStyle/shape-55cmq)

The shape to use for the hover effect.

[`UIShape`](/documentation/UIKit/UIShape-c.class)

An abstract representation of a shape.

### Specifying a hover effect

[`effect`](/documentation/UIKit/UIHoverStyle/effect-4vdoj)

The effect to apply to the view with this style.

[`UIHoverAutomaticEffect`](/documentation/UIKit/UIHoverAutomaticEffect-swift.struct)

A system-default hover effect that automatically selects the appropriate effect based on the view to which it applies.

[`UIHoverHighlightEffect`](/documentation/UIKit/UIHoverHighlightEffect-swift.struct)

An effect that applies a highlight to the view on hover.

[`UIHoverLiftEffect`](/documentation/UIKit/UIHoverLiftEffect-swift.struct)

An effect that can visually lift the view on hover where appropriate.

[`UIHoverEffect`](/documentation/UIKit/UIHoverEffect-40091)

A hover effect that can apply to a view through a hover style.

[`effect`](/documentation/UIKit/UIHoverStyle/effect-12r83)

The effect to apply to the view with this style.

[`UIHoverAutomaticEffect`](/documentation/UIKit/UIHoverAutomaticEffect-c.class)

A system-default hover effect that automatically selects the appropriate effect based on the view to which it applies.

[`UIHoverHighlightEffect`](/documentation/UIKit/UIHoverHighlightEffect-c.class)

An effect that applies a highlight to the view on hover.

[`UIHoverLiftEffect`](/documentation/UIKit/UIHoverLiftEffect-c.class)

An effect that can visually lift the view on hover where appropriate.

[`UIHoverEffect`](/documentation/UIKit/UIHoverEffect-ukid)

A hover effect that can apply to a view through a hover style.

### Managing the state of the hover effect

[`enabled`](/documentation/UIKit/UIHoverStyle/isEnabled)

A Boolean value that determines whether the hover effect is active.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Inherited By

[`UIPointerStyle`](/documentation/UIKit/UIPointerStyle)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)