---
title: "init(notPredicateWithSubpredicate:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nscompoundpredicate/init(notpredicatewithsubpredicate:)"
---

# init(notPredicateWithSubpredicate:)

Returns a new predicate that you form using a NOT operation on a specified predicate.

## Declaration

```swift
init(notPredicateWithSubpredicate predicate: NSPredicate)
```

## Parameters

- `predicate`: A predicate.

## Return Value

Return Value A new predicate formed by NOT-ing the predicate specified by predicate.

## Discussion

Discussion For applications linked on macOS 10.5 or later, the subpredicates array is copied. For applications linked on OS X v10.4, the subpredicates array is retained (for binary compatibility).

## See Also

### Creating Compound Predicates

- [init(andPredicateWithSubpredicates:)](foundation/nscompoundpredicate/init(andpredicatewithsubpredicates:).md)
- [init(orPredicateWithSubpredicates:)](foundation/nscompoundpredicate/init(orpredicatewithsubpredicates:).md)
- [init(type:subpredicates:)](foundation/nscompoundpredicate/init(type:subpredicates:).md)
- [init(coder:)](foundation/nscompoundpredicate/init(coder:).md)
