<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAEmitterLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAEmitterLayer"
  },
  "title" : "CAEmitterLayer"
}
-->

# CAEmitterLayer

A layer that emits, animates, and renders a particle system.

```
class CAEmitterLayer
```

## Overview

The particles, defined by instances of [`CAEmitterCell`](/documentation/QuartzCore/CAEmitterCell), are drawn above the layer’s background color and border.

The following code shows how to set up a simple point (the default [`emitterShape`](/documentation/QuartzCore/CAEmitterLayer/emitterShape) is [`point`](/documentation/QuartzCore/CAEmitterLayerEmitterShape/point)) particle emitter. It uses an image named `RadialGradient.png` as the cell contents and, by setting the emitter cell’s [`emissionRange`](/documentation/QuartzCore/CAEmitterCell/emissionRange) to `2` × <doc://com.apple.documentation/documentation/Swift/FloatingPoint/pi>, the particles are emitted in all directions.

```swift
let emitterLayer = CAEmitterLayer()
    
emitterLayer.emitterPosition = CGPoint(x: 320, y: 320)
    
let cell = CAEmitterCell()
cell.birthRate = 100
cell.lifetime = 10
cell.velocity = 100
cell.scale = 0.1
    
cell.emissionRange = CGFloat.pi * 2.0
cell.contents = UIImage(named: "RadialGradient.png")!.cgImage
    
emitterLayer.emitterCells = [cell]
    
view.layer.addSublayer(emitterLayer)
```

## Topics

### Specifying Particle Emitter Cells

[`emitterCells`](/documentation/QuartzCore/CAEmitterLayer/emitterCells)

The array emitter cells attached to the layer.

### Emitter Geometry

[`renderMode`](/documentation/QuartzCore/CAEmitterLayer/renderMode)

Defines how particle cells are rendered into the layer.

[`emitterPosition`](/documentation/QuartzCore/CAEmitterLayer/emitterPosition)

The position of the center of the particle emitter. Animatable.

[`emitterShape`](/documentation/QuartzCore/CAEmitterLayer/emitterShape)

Specifies the emitter shape.

[`emitterZPosition`](/documentation/QuartzCore/CAEmitterLayer/emitterZPosition)

Specifies the center of the particle emitter shape along the z-axis. Animatable.

[`emitterDepth`](/documentation/QuartzCore/CAEmitterLayer/emitterDepth)

Determines the depth of the emitter shape.

[`emitterSize`](/documentation/QuartzCore/CAEmitterLayer/emitterSize)

Determines the size of the particle emitter shape. Animatable.

### Emitter Cell Attribute Multipliers

[`scale`](/documentation/QuartzCore/CAEmitterLayer/scale)

Defines a multiplier applied to the cell-defined particle scale.

[`seed`](/documentation/QuartzCore/CAEmitterLayer/seed)

Specifies the seed used to initialize the random number generator.

[`spin`](/documentation/QuartzCore/CAEmitterLayer/spin)

Defines a multiplier applied to the cell-defined particle spin. Animatable.

[`velocity`](/documentation/QuartzCore/CAEmitterLayer/velocity)

Defines a multiplier applied to the cell-defined particle velocity. Animatable.

[`birthRate`](/documentation/QuartzCore/CAEmitterLayer/birthRate)

Defines a multiplier that is applied to the cell-defined birth rate. Animatable

[`emitterMode`](/documentation/QuartzCore/CAEmitterLayer/emitterMode)

Specifies the emitter mode.

[`lifetime`](/documentation/QuartzCore/CAEmitterLayer/lifetime)

Defines a multiplier applied to the cell-defined lifetime range when particles are created. Animatable.

[`preservesDepth`](/documentation/QuartzCore/CAEmitterLayer/preservesDepth)

Defines whether the layer flattens the particles into its plane.

### Constants

[Emitter Shape](/documentation/QuartzCore/emitter-shape)

The emission shape is a one, two or three dimensional shape that defines where the emitted particles originate. The shapes are defined by a subset of [`emitterPosition`](/documentation/QuartzCore/CAEmitterLayer/emitterPosition), [`emitterZPosition`](/documentation/QuartzCore/CAEmitterLayer/emitterZPosition), [`emitterSize`](/documentation/QuartzCore/CAEmitterLayer/emitterSize) and [`emitterDepth`](/documentation/QuartzCore/CAEmitterLayer/emitterDepth) properties.

[Emitter Modes](/documentation/QuartzCore/emitter-modes)

These constants specify the possible emitter modes. They are used by the [`emitterMode`](/documentation/QuartzCore/CAEmitterLayer/emitterMode) property.

[Emitter Render Order](/documentation/QuartzCore/emitter-render-order)

These constants specify the order that emitter cells are composited. They are used by the [`renderMode`](/documentation/QuartzCore/CAEmitterLayer/renderMode) property.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)