init(value:forProperty:comparisonType:)
Creates a media property predicate with a specified comparison type.
Declaration
init(value: Any?, forProperty property: String, comparisonType: MPMediaPredicateComparison)Parameters
- value:
The property value that you want to match when you query the Music library. For example, if you specify the
MPMediaItemPropertyArtistconstant in theforPropertyparameter, in this parameter you supply a string containing the artist name. - property:
A property to use to build a media property predicate. See General Media Item Property Keys and Podcast Item Property Keys in Mpmediaitem.
- comparisonType:
: The logical comparison type for the predicate. See Mpmediapredicatecomparison.
Return Value
A media property predicate.