---
title: "rotate(byDegrees:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/rotate(bydegrees:)"
---

# rotate(byDegrees:)

Rotates the view’s bounds rectangle by a specified degree value around the origin of the coordinate system, (0.0, 0.0).

## Declaration

```swift
func rotate(byDegrees angle: CGFloat)
```

## Parameters

- `angle`: A float value specifying the angle of rotation, in degrees.

## Discussion

Discussion See the boundsRotation method description for more information. This method neither redisplays the view nor marks it as needing display. You must do this yourself by calling the display() method or setting the needsDisplay property. This method posts an boundsDidChangeNotification to the default notification center if the view is configured to do so.

## See Also

### Related Documentation

- [frameRotation](appkit/nsview/framerotation.md)
- [postsBoundsChangedNotifications](appkit/nsview/postsboundschangednotifications.md)

### Modifying the Coordinate System

- [translateOrigin(to:)](appkit/nsview/translateorigin(to:).md)
- [scaleUnitSquare(to:)](appkit/nsview/scaleunitsquare(to:).md)
