Questions tagged [caemitterlayer]

The CAEmitterLayer class provides a particle emitter system for Core Animation. The particles are defined by instances of CAEmitterCell.

The CAEmitterLayer class provides a particle emitter system for Core Animation. The particles are defined by instances of CAEmitterCell. Inherits from CALayer : NSObject

CAEmitterLayer Class Reference: Official Apple Documentation

98 questions
1
vote
1 answer

CAEmitterLayer doesn't work in MacOS with Swift

I just simply create a storyboard program, and change the main ViewController code to the code below which works well in others' example. but it appears nothing on the view? seeking help. What I did: create an project with storyboard, and I got…
JeremyGuo
  • 21
  • 5
1
vote
2 answers

CAEmitterLayer, eventually, has delay when adding EmitterCells

A very bizarre issue we've been seeing (gifs below), We have a presented View Controller that has a TeamBadgeView, which is a button that emits emoji as CAEmitterCells Tapping this button lets users spam a fire emoji on their screen Dismissing…
A O
  • 5,516
  • 3
  • 33
  • 68
1
vote
2 answers

How can you make a CAEmitterLayer only spawn one cell at a time swift 4

I am trying to make it so my CAEmitterLayer object only spawn one cell at time. Once the cell lifetime expires, I want to spawn the next and so on. The reason for this is because they keep overlapping causing it to look awful. I tried apples…
Zack117
  • 985
  • 1
  • 13
  • 28
1
vote
0 answers

CAEmitter is positioning particles vertically in random places

My emitterShape is set as a line, which positions the cells horizontally in random places, but for some reason, it also places the cells vertically all over my screen in random places. Why? I only want the particle's start position to be somewhere…
Chewie The Chorkie
  • 4,896
  • 9
  • 46
  • 90
1
vote
0 answers

CAEmitterlayer crashing when birthrate over 5 in iOS 9

I'm using a particle emitter in an iPad project (not using SpriteKit), the particle emitter is generated inside a UIImageView and since iOS 9 this emitter is making the whole app crash. Actually, the whole iPad is crashing, the image freezes and…
PhilBlais
  • 1,076
  • 4
  • 13
  • 36
1
vote
1 answer

Can someone tell me why I get "Potential leak of an object" on CGColorCreateCopy?

Here is my code -- Compiling on Xcode 6.3 for iOS8 and above: //Create the emitter layer CAEmitterLayer *emitter = [CAEmitterLayer layer]; emitter.emitterPosition = position; emitter.emitterMode = kCAEmitterLayerOutline; emitter.emitterShape =…
Jann
  • 2,214
  • 3
  • 28
  • 45
1
vote
1 answer

CAEmitterCell with 3D rotation

I'm trying to reproduce pieces of small paper falling from top effect, using CAEmitterLayer & CAEmitterCell. So far, I got the 2D animation of it, But I'm having difficulty to make each cell to rotate when falling. How to I apply random rotation on…
Simon
  • 17,223
  • 1
  • 19
  • 23
1
vote
0 answers

CAEmitterLayer - How can I make the emiterCell particles appear all at once instead of setting the birthrate for particles per second?

This is how my emitterLayer is set up: emitterLayer.position = CGPointMake(sumIndent ,_emitterView.frame.origin.y); emitterLayer.backgroundColor = [[UIColor clearColor] CGColor]; emitterLayer.emitterPosition =…
1
vote
1 answer

iOS - CAEmitterCell using Swift

I'm trying to create a particle system for an iOS app. the app doesn't use SpriteKit, so i'm using CAEmitterLayer and CAEmitterCell to do it. In Objective - C, i initialized a CAEmitterCell this way: [CAEmitterCell emitterCell]; but in swift there…
1
vote
1 answer

Multiple CAEmitterLayer sources

I want to generate different CAEmitterCells from multiple points. So far my solution is to created multiple CAEmitterLayers, each with one cell, so that I can control them individually. The problem with this approach is setting the layers render…
1
vote
0 answers

Can CAEmitterCell have vector based contents?

I want to use CALayers or another vector based drawing for the particles in my system. I need to zoom in with out pixelation. I would like to do something like this CALayer* layer = [CALayer layer]; emitterCell.contents = (id)layer;
The Way
  • 594
  • 5
  • 15
1
vote
1 answer

Moving Particle View to Front of Screen?

I currently have a particle view connected to storyboard. The problem that I'm facing is that I'm displaying an alert at the same time I show this view, and the alert is always shown in front of the particle view. Is there a way where I can always…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
1
vote
1 answer

ios -- How to limit extent of CAEmitter particle trajectories?

I successfully added a CAEmitter to my UIView inside a subview, but the particles emitted by that layer extend outside that view. Please see code below for the cookiecutter code and parameters. My question is how I can prevent the generated…
Erika Electra
  • 1,854
  • 3
  • 20
  • 31
1
vote
1 answer

How to get a CAEmitterLayer from Canvas

I am trying to follow the tutorial about iOS particle systems here: http://www.raywenderlich.com/6063/uikit-particle-systems-in-ios-5-tutorial I am having trouble casting the self.canvas.layer in C4Workspace.m to a CAEmitterLayer. The code compiles…
Adam Tindale
  • 1,239
  • 10
  • 26
1
vote
0 answers

iOS 6 EmitterCells birthrate not working correctly

I've found some more very strange behavior with regards to the CAEmitterCell in iOS 6. Please note that these problems only exist when running iOS 6. And also note that I'm referring too Cells that are children of other cells. I've tested iOS 6…
LampShade
  • 2,675
  • 5
  • 30
  • 60