I'm working on creating a CAEmitterLayer that's the height of the screen, and pushed off -X, so the CAEmitterCells travel from left (off the screen) to upper right.
There's an issue I am running into where the emitterSize height property of CAEmitterLayer is being ignored. This is causing all the cells to emit from a single point, and not what's set with emitterSize.
Here's the emitter:
emitter.emitterPosition = CGPoint(x: -50, y: (view.frame.height / 2))
emitter.emitterShape = kCAEmitterLayerLine
emitter.emitterSize = CGSize(width: 2, height: view.frame.height)
i mentioned emitterSize height is not working, because if i change the width of the above emitterSize, I can see the width changing properly! No matter what value I put for height... it gets ignored.
And the CAEmitterCells
cell.birthRate = 10
cell.lifetime = 10
cell.velocity = CGFloat(50)
cell.emissionLongitude = (45 * (.pi/180))
How can I set the emitterSize width to be 2 points wide and the height of the view?