---
title: "init(container:center:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uipreviewtarget/init(container:center:)"
---

# init(container:center:)

Creates a preview target object using the specified container view and center point.

## Declaration

```swift
convenience init(container: UIView, center: CGPoint)
```

## Parameters

- `container`: The container for the view being animated. This view must be in a window.
- `center`: The point in container at which to place the center of the view being animated. Specify this point in the coordinate system of container.

## Return Value

Return Value A new preview target object with the specified container and configuration data.

## See Also

### Creating a preview target object

- [init(container:center:transform:)](uikit/uipreviewtarget/init(container:center:transform:).md)
