Instance Method


Initializes and returns a “pop-up-pop-up-view”–style row template.


- (instancetype)initWithLeftExpressions:(NSArray<NSExpression *> *)leftExpressions rightExpressionAttributeType:(NSAttributeType)attributeType modifier:(NSComparisonPredicateModifier)modifier operators:(NSArray<NSNumber *> *)operators options:(NSUInteger)options;



An array of NSExpression objects that represent the left side of a predicate.


An attribute type for the right side of a predicate. This value dictates the type of view created, and how the control’s object value is coerced before putting it into a predicate.


A modifier for the predicate (see NSComparisonPredicateModifier for possible values).


An array of NSNumber objects specifying the operator type (see NSPredicateOperatorType for possible values).


Options for the predicate (see NSComparisonPredicateOptions for possible values).

Return Value

A row template initialized using the specified arguments.


The type of attributeType dictates the type of view created. For example, NSDateAttributeType creates an NSDatePicker object, NSInteger64AttributeType creates a short text field, and NSStringAttributeType produces a longer text field. You can resize the views as you want.

Predicates do not automatically coerce types for you. For example, comparing a number to a string will raise an exception. Therefore, the attribute type is also needed to determine how the control's object value must be coerced before putting it into a predicate.

See Also

Initializing a Template

- initWithLeftExpressions:rightExpressions:modifier:operators:options:

Initializes and returns a “pop-up-pop-up-pop-up”–style row template.

- initWithCompoundTypes:

Initializes and returns a row template suitable for displaying compound predicates.