<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCompoundPredicate/init(notPredicateWithSubpredicate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCompoundPredicate(cm)notPredicateWithSubpredicate:"
  },
  "title" : "init(notPredicateWithSubpredicate:)"
}
-->

# init(notPredicateWithSubpredicate:)

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

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

## Parameters

`predicate`

A predicate.

## Return Value

A new predicate formed by NOT-ing the predicate specified by `predicate`.

## 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).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)