I have this code on my initial view controller and then on my second view controller but it only works on the first view controller.
let halo = PulsingHaloLayer()
halo.position = view.center
view.layer.addSublayer(halo)
halo.backgroundColor = UIColor.blue.cgColor
halo.animationDuration = 3
halo.repeatCount = 3
halo.start()
I have this code on my initial view controller and then on my second view controller but it only works on the first view controller. let halo = PulsingHaloLayer() halo.position = view.center view.layer.addSublayer(halo) halo.backgroundColor = UIColor.blue.cgColor halo.animationDuration = 3 halo.repeatCount = 3 halo.start()