Returns a positive number if the receiver can represent a given predicate, and 0
if it cannot.
SDK
- macOS 10.5+
Framework
- App
Kit
Declaration
func match(for predicate: NSPredicate) -> Double
Return Value
A positive number if the template can represent predicate
, and 0
if it cannot.
Discussion
By default, returns values in the range 0
to 1
.
The highest match among all the templates determines which template is responsible for displaying the predicate. You can override this to determine which predicates your custom template handles.