Created
July 25, 2014 00:03
-
-
Save a2/ffc7a2b146596db58732 to your computer and use it in GitHub Desktop.
CGRectDivide override that returns a tuple.
This file contains hidden or 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
import CoreGraphics | |
func CGRectDivide(rect: CGRect, amount: CGFloat, edge: CGRectEdge) -> (slice: CGRect, remainder: CGRect) { | |
var slice = CGRectZero | |
var remainder = CGRectZero | |
CGRectDivide(rect, &slice, &remainder, amount, edge) | |
return (slice, remainder) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment