<!--
{
  "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/CAEmitterCell/emitterCells",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAEmitterCell(py)emitterCells"
  },
  "title" : "emitterCells"
}
-->

# emitterCells

An optional array containing the sub-cells of this cell.

```
var emitterCells: [CAEmitterCell]? { get set }
```

## Discussion

When specified, each particle emitted by the cell acts as an emitter for each of the cell’s sub-cells. The emission point is the current particle position and the emission angle is relative to the current direction of the particle.

The default value of this property is `nil`.

The following code shows how you can create a firework style effect using sub-cells. The `fireworkCell` has an emission longitude of one quarter turn anti-clockwise to emit particles upwards. It emits `trailCell` instances which have a slight [`yAcceleration`](/documentation/QuartzCore/CAEmitterCell/yAcceleration) that simulates gravity.

Note that the [`scale`](/documentation/QuartzCore/CAEmitterCell/scale) and [`color`](/documentation/QuartzCore/CAEmitterCell/color) of `fireworkCell` are inherited by `trailCell`.

Listing 1. Creating particle trails

```swift
let image = UIImage(named: "RadialGradient.png")!.cgImage
    
let emitterLayer = CAEmitterLayer()
    
emitterLayer.emitterPosition = CGPoint(x: 512, y: 512)
    
let fireworkCell = CAEmitterCell()
fireworkCell.color = UIColor.red.cgColor
fireworkCell.birthRate = 3
fireworkCell.lifetime = 10
fireworkCell.velocity = 100
fireworkCell.scale = 0.05
fireworkCell.emissionLongitude = -CGFloat.pi * 0.5
fireworkCell.emissionRange = -CGFloat.pi * 0.25
fireworkCell.contents = image
    
let trailCell = CAEmitterCell()
trailCell.yAcceleration = 20
trailCell.birthRate = 10
trailCell.lifetime = 3
trailCell.contents = image
    
fireworkCell.emitterCells = [trailCell]
emitterLayer.emitterCells = [fireworkCell]
    
view.layer.addSublayer(emitterLayer)
```

---

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)