Created
May 6, 2015 09:29
-
-
Save samuelbeek/0bd1eb712c86a3abc300 to your computer and use it in GitHub Desktop.
Compare Sizes (CGSize) in Swift
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
func isSmaller(smaller: CGSize, bigger: CGSize) -> Bool { | |
if(smaller.width >= bigger.width) { return false } | |
if(smaller.height >= bigger.height) { return false } | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment