NSPredicate

class NSPredicate : NSObject, NSSecureCoding, NSCopying
  • Mechanica

    An always true NSPredicate.

    Declaration

    Swift

    public static let `true`: NSPredicate
  • Mechanica

    An always false NSPredicate.

    Declaration

    Swift

    public static let `false`: NSPredicate
  • Mechanica

    Declaration

    Swift

    public func and(_ predicate: NSPredicate) -> NSPredicate

    Parameters

    predicate

    A NSPredicate object.

    Return Value

    a new compound NSPredicate formed by AND-ing self with predicate.

  • Mechanica

    Declaration

    Swift

    public func or(_ predicate: NSPredicate) -> NSPredicate

    Parameters

    predicate

    A NSPredicate object.

    Return Value

    a new compound NSPredicate formed by OR-ing self with predicate.

  • Mechanica

    Returns a new predicate formed by AND-ing the two predicates.

    Declaration

    Swift

    public static func && (lhs: NSPredicate, rhs: NSPredicate) -> NSPredicate

    Parameters

    lhs

    The left-hand side of the operation.

    rhs

    The right-hand side of the operation.

  • Mechanica

    Returns a new predicate formed by OR-ing the two predicates.

    Declaration

    Swift

    public static func || (lhs: NSPredicate, rhs: NSPredicate) -> NSPredicate

    Parameters

    lhs

    The left-hand side of the operation.

    rhs

    The right-hand side of the operation.

  • Mechanica

    Returns a new predicate forme d by NOT-ing a given predicate.

    Declaration

    Swift

    public prefix static func ! (predicate: NSPredicate) -> NSPredicate

    Parameters

    p

    The NSPredicate to negate.