---
title: "addTrackAssociation(to:type:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablemovietrack/addtrackassociation(to:type:)"
---

# addTrackAssociation(to:type:)

Creates a specific type of track association between two tracks.

## Declaration

```swift
func addTrackAssociation(to movieTrack: AVMovieTrack, type trackAssociationType: AVAssetTrack.AssociationType)
```

## Parameters

- `movieTrack`: The AVMovieTrack object to be associated with the receiver.
- `trackAssociationType`: The type of track association to add between the receiver and the specified movie track.

## See Also

### Managing track associations

- [availableTrackAssociationTypes](avfoundation/avmutablemovietrack/availabletrackassociationtypes.md)
- [associatedTracks(ofType:)](avfoundation/avmutablemovietrack/associatedtracks(oftype:).md)
- [removeTrackAssociation(to:type:)](avfoundation/avmutablemovietrack/removetrackassociation(to:type:).md)
