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
3
votes
1 answer

Suspend Particles in CAEmitterLayer

I have the following code that adds particles to a UIView named ParentView at the center of some other UIView: CAEmitterLayer *emitterLayer = [CAEmitterLayer layer]; emitterLayer.emitterPosition = CGPointMake(view.center.x, view.center.y -…
Hahnemann
  • 4,378
  • 6
  • 40
  • 64
3
votes
2 answers

CAEmitterLayer not Shown

I'm simply adding a UIView to my storyboard view controller and then creating a UIView class to display a particle effect. I change the UIView's class name to that of the custom class I created. The code I'm using in the UIView class does not…
Jack120
  • 213
  • 1
  • 6
  • 21
3
votes
1 answer

Improving/Optimizing performance of CAEmitterLayer animation (emit along path?)

Here's a video of what I've got thus far. Pardon the choppiness, my MBP + QuickTime + Xcode isn't the best. http://www.youtube.com/watch?v=DGRwz7n3kNA It's a really rough draft on what I want, but you can get the idea. Performance is the biggest…
rnystrom
  • 1,906
  • 2
  • 21
  • 47
2
votes
1 answer

Pausing and Resuming CAEmitterLayer Multiple of Times

I have a CAEmitterLayer instance that I want to pause and then resume multiple times. I have found various ways to do this using two CAEmitterLayer extension functions: public func pause() { speed = 0.0 // Freeze existing cells. timeOffset =…
ajrlewis
  • 2,968
  • 3
  • 33
  • 67
2
votes
2 answers

creating a vertical CAEmitterLayer

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…
Joe
  • 3,772
  • 3
  • 33
  • 64
2
votes
0 answers

How to Perform a Card Burn Animation

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…
mukul
  • 382
  • 1
  • 11
2
votes
2 answers

CAEmitterLayer doesn't add basic animation if beginTime was set for it

I am trying to animate an explosion with CAEmitterLayer and a couple of CAEmitterCell. This should happen after a short delay after user sees a view. I start my animation in viewDidAppear. Particle animation itself works fine, but as in this…
user1264176
  • 1,118
  • 1
  • 9
  • 26
2
votes
1 answer

ScreenSaverView with CAEmitterLayer choppy on second screen

Any ideas why a screen saver using just a plain ScreenSaverView subclass with a CAEmitterLayer sublayer would render fine on the primary screen and choppy (as if every 2. frame renders there..) on the secondary screen..? This is my initialization…
ATV
  • 4,116
  • 3
  • 23
  • 42
2
votes
1 answer

Rotate CAEmitterCell content based on Animation Direction

Using CAEmitterLayer and Cell to show particles that have direction sensitive content image (an arrow). Want the content (arrow image) to point in the direction the cell is moving. Here is code for having all the arrows move from outside edge…
tiltem
  • 4,952
  • 3
  • 23
  • 26
2
votes
1 answer

CAEmitterLayer animation that leaves accurate trail along the path

I need to leave a trail with UIView that is animated with CAKeyframeAnimation Ball * ball = [[Ball alloc]init]; // customized the ball CGMutablePathRef path = CGPathCreateMutable(); // filling in the path from points. CAKeyframeAnimation *anim…
Stpn
  • 6,202
  • 7
  • 47
  • 94
2
votes
1 answer

iOS: CAEmitter Layer and EmitterCell Flips Image on iOS 6

Was playing around with CAEmitterLayer and discovered something really weird. I set up the CAEmitterLayer at the lower left corner, positioned at 45 degree (pointing towards the top right corner) and tried to shoot some arrows toward the top right…
Unheilig
  • 16,196
  • 193
  • 68
  • 98
2
votes
2 answers

CAEmitter smooth start of animation

I am trying to have a CAEmitterLayer make a kind of lightsaber animation. I want a beam of light to appear from a point and stop. My problem is that I cannot get the beginning of the animation to happen smoothly. As soon as I run the code it just…
gabriellanata
  • 3,946
  • 2
  • 21
  • 27
2
votes
1 answer

Animating CAEmitterLayer's emitterPosition

I am trying to animate a CAEmitterLayer's emitterPosition like this: CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"emitterPosition.x"] ; animation.toValue = (id) toValue ; animation.removedOnCompletion = NO…
leftspin
  • 2,468
  • 1
  • 25
  • 40
1
vote
1 answer

Aligning four CAEmitterLayer() on each side of view, pointing inward

I'm working on adding 4 CAEmitterLayers to a subview. Each CAEmitterLayer is a line, and will be positioned on each side. Rotation will be controlled via CGAffineTransform My problem: I can't get the .Left and .Right emitterPosition to properly line…
Joe
  • 3,772
  • 3
  • 33
  • 64
1
vote
2 answers

How do I set fire to a UIView in Swift?

How do I produce an animation that simulates the burning effect of fire consuming an UIView from top to bottom in Swift? I found Fireworks, an app that allows users to tweak and try out different settings of CAEmitterLayer with instant results. The…
Adrian Bartholomew
  • 2,506
  • 6
  • 29
  • 37