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

# init(items:)

Initializes a gravity behavior with an array of dynamic items.

## Declaration

```swift
init(items: [any UIDynamicItem])
```

## Parameters

- `items`: The dynamic items that you want to be subject to the gravity behavior.

## Return Value

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