bendodson / calayer-cgcolor-for-ib-swift

Use UIColor in interface builder for CALayer properties

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CALayer extension for using UIColor with CALayer

A simple extension for CALayer (in Swift) which allows you to set UIColor against the shadowColor and borderColor properties so they can be set within Interface Builder:

calayer-cgcolor-for-ib-swift example

calayer-cgcolor-for-ib-swift example result

Example Usage

Simply set the property layer.IBShadowColor or layer.IBBorderColor as a UIColor in Interface Builder and at runtime the appropriate CGColor will be used.

About

Use UIColor in interface builder for CALayer properties

License:The Unlicense


Languages

Language:Swift 100.0%