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
Summary
Returns
An affine transformation matrix that fits the source into the target.
Notice
Note: In portrait, this function aligns the top and bottom edges to the target.
Parameters
| Name | Type | Summary |
|---|---|---|
| source | CGSize | The size of the source container. |
| sourceOrientation | UIInterfaceOrientation | The orientation of the source container. |
| target | CGSize | The size of the target container. |
| targetOrientation | UIInterfaceOrientation | The orientation of the target container. |
Returns an affine transformation that maps normalized coordinates in the source frame to normalized coordinates in the target frame.