Custom Controls in iOS - Part 5: Drawing With Layers | Ray Wenderlich

Learn how to create complex custom controls using Core Animation layers and begin building a Three Ring Control.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4433-custom-controls-in-ios/lessons/5

when to call this method

override init(layer: Any) {
super.init(layer: layer)

guard let layer = layer as? RingLayer
else {return}

ringWidth = layer.ringWidth
value = layer.value
ringBackgroundColor = layer.ringBackgroundColor
ringColor = layer.ringColor

}

@catie Can you please help with this when you get a chance? Thank you - much appreciated! :]