<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPreviewTarget/init(container:center:transform:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPreviewTarget(im)initWithContainer:center:transform:"
  },
  "title" : "init(container:center:transform:)"
}
-->

# init(container:center:transform:)

Creates a preview target object using the specified container view and configuration details.

```
init(container: UIView, center: CGPoint, transform: CGAffineTransform)
```

## 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`.

`transform`

An affine transform to apply to the view being animated. You might use this transform to scale or rotate the view.

## Return Value

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

---

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)