2

I want to perform a card burn animation like I have a card of Spade and I want it to view like burn animation like burning from the bottom of card to top of the card and disappear at same time where it is burn . I know that i can use CAEmitterLayer or Particle effect but I don't exactly know how can I use these. Can Anyone tell me how can I perform this?

let particleEffect = CAEmitterLayer()
let emitterCell = CAEmitterCell()
emitterCell.birthRate = 0.5
emitterCell.velocity = 10.0
emitterCell.lifetime = 100
Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
mukul
  • 382
  • 1
  • 11
  • 1
    You can refer this link: https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BBurn.swift. The library is doing a similar thing with UILabel. Basically, It is about masking image. – Rakesh Gujari Dec 20 '17 at 13:29
  • But this thing i have to perform on imageView ? – mukul Dec 21 '17 at 05:59
  • 1
    Yea there's basically two parts to your answer - masking/hiding the "burned up" portion of the card, and adding the particles. On that emitter you also need to set the size etc if you want it to look like the bottom edge is burning. – Chris Slowik Dec 23 '17 at 20:18

0 Answers0