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