-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hello!
You should insert the gradient layer as the first layer, so superviews are not overlaid by the gradient.
private func installGradient() {
// if there's already a gradient installed on the layer, remove it
if let gradient = self.gradient {
gradient.removeFromSuperlayer()
}
let gradient = createGradient()
//self.layer.addSublayer(gradient)
self.layer.insertSublayer(gradient, at: 0)
self.gradient = gradient
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels