<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/cancelPreviousPerformRequests(withTarget:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(cm)cancelPreviousPerformRequestsWithTarget:"
  },
  "title" : "cancelPreviousPerformRequests(withTarget:)"
}
-->

# cancelPreviousPerformRequests(withTarget:)

Cancels perform requests previously registered with the [`perform(_:with:afterDelay:)`](/documentation/ObjectiveC/NSObject-swift.class/perform(_:with:afterDelay:)) instance method.

```
class func cancelPreviousPerformRequests(withTarget aTarget: Any)
```

## Parameters

`aTarget`

The target for requests previously registered with the [`perform(_:with:afterDelay:)`](/documentation/ObjectiveC/NSObject-swift.class/perform(_:with:afterDelay:)) instance method.

## Discussion

All perform requests having the same target `aTarget` are canceled. This method removes perform requests only in the current run loop, not all run loops.

---

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)