affineFit
Returns an affine transformation that maps normalized coordinates in the source frame to normalized coordinates in the target frame....
Declaration
static func affineFit(source: CGSize, sourceOrientation: UIInterfaceOrientation, target: CGSize, targetOrientation: UIInterfaceOrientation) -> CGAffineTransform
Returns an affine transformation that maps normalized coordinates in the source frame to normalized coordinates in the target frame.
- Note: In portrait, this function aligns the top and bottom edges to the target.
- Parameters:
- source: The size of the source container.
- sourceOrientation: The orientation of the source container.
- target: The size of the target container.
- targetOrientation: The orientation of the target container.
- Returns: An affine transformation matrix that fits the source into the target.