<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/HoverEffectContent/rotationEffect(_:anchor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18HoverEffectContentPAAE08rotationD0_6anchorQrAA5AngleV_AA9UnitPointVtF"
  },
  "title" : "rotationEffect(_:anchor:)"
}
-->

# rotationEffect(_:anchor:)

Rotates content in two dimensions around the specified point.

```
func rotationEffect(_ angle: Angle, anchor: UnitPoint = .center) -> some HoverEffectContent
```

## Parameters

`angle`

The angle by which to rotate the content.

`anchor`

A unit point within the content about which to
perform the rotation. The default value is [`center`](/documentation/SwiftUI/UnitPoint/center).

## Return Value

A rotation effect.

## Discussion

This effect rotates the content around the axis that points
out of the xy-plane. It has no effect on the content’s frame.

---

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)