Skip to content

Instantly share code, notes, and snippets.

@samuelbeek
Created May 6, 2015 09:29
Show Gist options
  • Save samuelbeek/0bd1eb712c86a3abc300 to your computer and use it in GitHub Desktop.
Save samuelbeek/0bd1eb712c86a3abc300 to your computer and use it in GitHub Desktop.
Compare Sizes (CGSize) in Swift
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