<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIControl/removeTarget(_:action:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIControl(im)removeTarget:action:forControlEvents:"
  },
  "title" : "removeTarget(_:action:for:)"
}
-->

# removeTarget(_:action:for:)

Stops the delivery of events to the specified target object.

```
func removeTarget(_ target: Any?, action: Selector?, for controlEvents: UIControl.Event)
```

## Parameters

`target`

A target object registered with the control. Specify `nil` to remove the specified control events for all target objects.

`action`

A selector identifying a registered action method. You may specify `nil` for this parameter.

`controlEvents`

A bitmask specifying the control events that you want to remove for the specified `target` object. For a list of possible constants, see [`UIControl.Event`](/documentation/UIKit/UIControl/Event).

## Discussion

Use this method to prevent the delivery of control events to target objects associated with control. If you specify a valid object in the `target` parameter, this method stops the delivery of the specified events to all action methods associated with that object. If you specify `nil` for the `target` parameter, this method prevents the delivery of those events to all action methods of all target objects.

Although the `action` parameter is not considered when stopping the delivery of events, you should specify an appropriate value anyway. If the specified target/action combination no longer has any valid control events associated with it, the control cleans up its corresponding internal data structures. Doing so can affect the set of objects returned by the [`allTargets`](/documentation/UIKit/UIControl/allTargets) method.

---

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)