Kelvin Tan
Apr 16, 2021

Hey Simon, you will need to specify a CALayer where the gradient is applied to.

Let's say inside your `createCircle`, you've created a segmentLayer of type CAShapeLayer.

Inside `createCircle`, you just gotta use `addGradientLayer(to: segmentLayer)`

Kelvin Tan
Kelvin Tan

Written by Kelvin Tan

Father, husband, software engineer. Building software and building a family, one line of code and one moment at a time. 🚀💻💙 http://ko-fi.com/kelvintanzy

Responses (1)