Closed minaMagedNaeem closed 5 years ago
my code: ` let pulsator = Pulsator() override func viewDidLoad() { super.viewDidLoad() shoppieImage.layer.superlayer!.insertSublayer(pulsator, below: shoppieImage.layer) pulsator.numPulse = 1 pulsator.animationDuration = 1 pulsator.repeatCount = 0 pulsator.pulseInterval = 0.25 pulsator.backgroundColor = ShopXStyle.yellowColor.cgColor pulsator.radius = 200 pulsator.name = "pulsator" pulsator.start() }
override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() view.layer.layoutIfNeeded() pulsator.position = shoppieImage.center }`
I fixed it, it just needed some alteration in pulsator's properties.
What were the alterations?
pulsator.radius = view.bound.height / 2 + 20
still not appear for me
my code: ` let pulsator = Pulsator() override func viewDidLoad() { super.viewDidLoad() shoppieImage.layer.superlayer!.insertSublayer(pulsator, below: shoppieImage.layer) pulsator.numPulse = 1 pulsator.animationDuration = 1 pulsator.repeatCount = 0 pulsator.pulseInterval = 0.25 pulsator.backgroundColor = ShopXStyle.yellowColor.cgColor pulsator.radius = 200 pulsator.name = "pulsator" pulsator.start() }
override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() view.layer.layoutIfNeeded() pulsator.position = shoppieImage.center }`