<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollisionBehaviorDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollisionBehaviorDelegate"
  },
  "title" : "UICollisionBehaviorDelegate"
}
-->

# UICollisionBehaviorDelegate

To respond to UIKit dynamic item collisions, configure a custom class to adopt the [`UICollisionBehaviorDelegate`](/documentation/UIKit/UICollisionBehaviorDelegate) protocol. Then, in a collision behavior (an instance of the [`UICollisionBehavior`](/documentation/UIKit/UICollisionBehavior) class), set the delegate to be an instance of your custom class.

```
@MainActor protocol UICollisionBehaviorDelegate : NSObjectProtocol
```

## Overview

The delegate is notified of collisions that occur between the behavior’s dynamic items, or between a dynamic item and a boundary, depending on the behavior’s mode (as set with its [`collisionMode`](/documentation/UIKit/UICollisionBehavior/collisionMode) property). In the case of a collision between an item and the boundary defined by a reference view, the identifier passed to the delegate method is `nil`. (For more on the reference view and the different ways to initialize a dynamic animator, read the Overview in [`UIDynamicAnimator`](/documentation/UIKit/UIDynamicAnimator).)

## Topics

### Responding to UIKit Dynamics collisions

[`-  collisionBehavior:beganContactForItem:withBoundaryIdentifier:atPoint:`](/documentation/UIKit/UICollisionBehaviorDelegate/collisionBehavior(_:beganContactFor:withBoundaryIdentifier:at:))

Called when a collision, between a dynamic item and a collision boundary, has begun.

[`-  collisionBehavior:beganContactForItem:withItem:atPoint:`](/documentation/UIKit/UICollisionBehaviorDelegate/collisionBehavior(_:beganContactFor:with:at:))

Called when a collision between two dynamic items has begun.

[`-  collisionBehavior:endedContactForItem:withBoundaryIdentifier:`](/documentation/UIKit/UICollisionBehaviorDelegate/collisionBehavior(_:endedContactFor:withBoundaryIdentifier:))

Called when a collision between a dynamic item and a boundary has ended.

[`-  collisionBehavior:endedContactForItem:withItem:`](/documentation/UIKit/UICollisionBehaviorDelegate/collisionBehavior(_:endedContactFor:with:))

Called when a collision between two dynamic items has ended.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)