<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBandSelectionInteraction/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIBandSelectionInteraction(im)initWithSelectionHandler:"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a new band selection interaction object with the provided handler code.

```
init(_ selectionHandler: @escaping (UIBandSelectionInteraction) -> Void)
```

## Parameters

`selectionHandler`

The handler block you use to process interaction-related events. The handler block has no return value and takes the following parameter:

- interaction: The band selection interaction object that reported the event. Use the [`state`](/documentation/UIKit/UIBandSelectionInteraction/state-swift.property) property of this object to determine what actions to take. For example, when the value of the property is [`UIBandSelectionInteraction.State.selecting`](/documentation/UIKit/UIBandSelectionInteraction/State-swift.enum/selecting), get the current selection rectangle and intersect it with the items in your view.

## Return Value

An initialized band selection interaction object. Add the returned object to a view to begin detecting interactions.

---

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)