---
title: "init(additionalLayer:asTrackID:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avvideocompositioncoreanimationtool/init(additionallayer:astrackid:)"
---

# init(additionalLayer:asTrackID:)

Adds a Core Animation layer to the video composition.

## Declaration

```swift
convenience init(additionalLayer layer: sending CALayer, asTrackID trackID: CMPersistentTrackID)
```

## Parameters

- `layer`: The Core Animation layer to add.
- `trackID`: A track ID to identify the track. trackID should not match any real trackID in the source.

## Return Value

Return Value A new Core Animation tool for the layer.

## Discussion

Discussion You use this method to include a Core Animation layer as an individual track input in video composition. Video composition instructions should reference trackID where the rendered animation should be included.

## See Also

### Creating a composition tool

- [init(postProcessingAsVideoLayer:in:)](avfoundation/avvideocompositioncoreanimationtool/init(postprocessingasvideolayer:in:).md)
- [init(postProcessingAsVideoLayers:in:)](avfoundation/avvideocompositioncoreanimationtool/init(postprocessingasvideolayers:in:).md)
- [init(configuration:)](avfoundation/avvideocompositioncoreanimationtool/init(configuration:).md)
- [AVVideoCompositionCoreAnimationTool.Configuration](avfoundation/avvideocompositioncoreanimationtool/configuration.md)
