Initializer

init(forKeyPath:)

Returns a new expression that invokes valueForKeyPath: with a given key path.

Declaration

init(forKeyPath keyPath: String)

Parameters

keyPath

The key path that the new expression should evaluate.

Return Value

A new expression that invokes value(forKeyPath:) with keyPath.

See Also

Creating an Expression for a Value

init(forConstantValue: Any?)

Returns a new expression that represents a given constant value.

class func expressionForEvaluatedObject() -> NSExpression

Returns a new expression that represents the object being evaluated.

init(forVariable: String)

Returns a new expression that extracts a value from the variable bindings dictionary for a given key.

class func expressionForAnyKey() -> NSExpression

Returns a new expression that represents any key for a Spotlight query.