shu223 / Pulsator

Pulse animation for iOS
MIT License
1.42k stars 160 forks source link

Pulsator animaton does not appear #47

Closed minaMagedNaeem closed 5 years ago

minaMagedNaeem commented 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 }`

minaMagedNaeem commented 5 years ago

I fixed it, it just needed some alteration in pulsator's properties.

ZkHaider commented 5 years ago

What were the alterations?

minaMagedNaeem commented 5 years ago

pulsator.radius = view.bound.height / 2 + 20

fukemy commented 3 years ago

still not appear for me