CALayer
class CALayer : NSObject, NSSecureCoding, CAMediaTiming
Collection of all CALayer Extensions.
Subspec: Extensions/CALayerExtension
-
This accepts paramters that Sketch has, and turns them into the identical shadow on this layer.
Declaration
Swift
func applySketchShadow(color: UIColor, alpha: Float = 1, shadowX: CGFloat = 0, shawdowY: CGFloat = 0, blur: CGFloat, spread: CGFloat = 0)Parameters
colorthe color of the shadow
alphathe alpha of the shadow
shadowXthe X-axis offset
shawdowYthe Y-axis offset
blurwhat Sketch calls
blur
spreadwhat Sketch calls
spread
CALayer Extension Reference