---
title: "cancelPreviousPerformRequests(withTarget:)"
framework: objectivec
role: symbol
role_heading: Type Method
path: "objectivec/nsobject-swift.class/cancelpreviousperformrequests(withtarget:)"
---

# cancelPreviousPerformRequests(withTarget:)

Cancels perform requests previously registered with the perform(_:with:afterDelay:) instance method.

## Declaration

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

## Parameters

- `aTarget`: The target for requests previously registered with the doc://com.apple.objectivec/documentation/ObjectiveC/NSObject-swift.class/perform(_:with:afterDelay:) instance method.

## Discussion

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.

## See Also

### Sending Messages

- [perform(_:with:afterDelay:)](objectivec/nsobject-swift.class/perform(_:with:afterdelay:).md)
- [perform(_:with:afterDelay:inModes:)](objectivec/nsobject-swift.class/perform(_:with:afterdelay:inmodes:).md)
- [performSelector(onMainThread:with:waitUntilDone:)](objectivec/nsobject-swift.class/performselector(onmainthread:with:waituntildone:).md)
- [performSelector(onMainThread:with:waitUntilDone:modes:)](objectivec/nsobject-swift.class/performselector(onmainthread:with:waituntildone:modes:).md)
- [perform(_:on:with:waitUntilDone:)](objectivec/nsobject-swift.class/perform(_:on:with:waituntildone:).md)
- [perform(_:on:with:waitUntilDone:modes:)](objectivec/nsobject-swift.class/perform(_:on:with:waituntildone:modes:).md)
- [performSelector(inBackground:with:)](objectivec/nsobject-swift.class/performselector(inbackground:with:).md)
- [cancelPreviousPerformRequests(withTarget:selector:object:)](objectivec/nsobject-swift.class/cancelpreviousperformrequests(withtarget:selector:object:).md)
