Created
January 19, 2016 22:35
-
-
Save maxcampolo/7dea5bc28b2b9fb6febf to your computer and use it in GitHub Desktop.
CALayer extension that adds borderUIColor as an attribute that can be set by key path in interface builder.
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
extension CALayer { | |
func borderUIColor() -> UIColor? { | |
return borderColor != nil ? UIColor(CGColor: borderColor!) : nil | |
} | |
func setBorderUIColor(color: UIColor) { | |
borderColor = color.CGColor | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment