<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMTagCollectionContainsSpecifiedTags",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMTagCollectionContainsSpecifiedTags"
  },
  "title" : "CMTagCollectionContainsSpecifiedTags"
}
-->

# CMTagCollectionContainsSpecifiedTags

Determines if a tag collection contains a subset of tags.

```
extern Boolean CMTagCollectionContainsSpecifiedTags(CMTagCollectionRef tagCollection, const CMTag *containedTags, CMItemCount containedTagCount);
```

## Parameters

`tagCollection`

The collection to inspect.

`containedTags`

A pointer to the first element of a C-style array of tags to search the collection for.

`containedTagCount`

The number of tags in the `tags` array.

## Return Value

Returns `YES` if the tag collection contains all tags from the `containedTags` array.

## Discussion

> Warning:
> Using a value of `containedTagCount` greater than the number of elements in the array starting from `containedTags` causes undefined behavior.

---

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)