value(onlyIfMatching:)
Retrieves a tag’s value as a specific type, if and only if it matches a category.
Declaration
func value<T>(onlyIfMatching category: CMTypedTag<T>.Category) -> T? where T : SendableParameters
- category:
The category to check if the tag contains.
Return Value
The value contained in the tag as an instance of type T if the category matches. Otherwise, returns nil.