Last active
December 17, 2015 05:39
-
-
Save joelrfcosta/5559368 to your computer and use it in GitHub Desktop.
Normalise CGRect
The value will be between 0 and 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGAffineTransform t = CGAffineTransformMakeScale(1.0f / parentRect.size.width, 1.0f / parentRect.size.height); | |
CGRect unitRect = CGRectApplyAffineTransform(rect, t); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment