Instance Method

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

func rotate(byDegrees angle: CGFloat)

Parameters

angle

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

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

Modifying the Coordinate System

func translateOrigin(to: NSPoint)

Translates the view’s coordinate system so that its origin moves to a new location.

func scaleUnitSquare(to: NSSize)

Scales the view’s coordinate system so that the unit square scales to the specified dimensions.