---
title: "init(items:mode:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uipushbehavior/init(items:mode:)"
---

# init(items:mode:)

Initializes a push behavior with an array of dynamic items.

## Declaration

```swift
init(items: [any UIDynamicItem], mode: UIPushBehavior.Mode)
```

## Parameters

- `items`: The dynamic items that you want to be subject to the push behavior.
- `mode`: The mode for the new push behavior; one of the values defined in the doc://com.apple.uikit/documentation/UIKit/UIPushBehavior/Mode-swift.enum enumeration. You must supply a value.

## Return Value

Return Value The initialized push behavior, or nil if there was a problem initializing the object.

## See Also

### Initializing and managing a push behavior

- [active](uikit/uipushbehavior/active.md)
- [addItem(_:)](uikit/uipushbehavior/additem(_:).md)
- [removeItem(_:)](uikit/uipushbehavior/removeitem(_:).md)
- [items](uikit/uipushbehavior/items.md)
