viewRotation
Declaration
static func viewRotation(fromOrientation: UIInterfaceOrientation, toOrientation: UIInterfaceOrientation) -> CGAffineTransform
Summary
Returns
A CGAffineTransform representing the rotation.
Parameters
| Name | Type | Summary |
|---|---|---|
| fromOrientation | UIInterfaceOrientation | The starting interface orientation. |
| toOrientation | UIInterfaceOrientation | The target interface orientation. |
Returns an affine transform that rotates between two interface orientations around the center.
This method models UI rotation (opposite to physical device rotation).
For example, rotating from
.landscapeRightto.portraitresults in a counter-clockwise transform.