<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPreviewTarget"
  },
  "title" : "UIPreviewTarget"
}
-->

# UIPreviewTarget

An object that specifies the container view to use for animations.

```
@MainActor class UIPreviewTarget
```

## Overview

Create a [`UIPreviewTarget`](/documentation/UIKit/UIPreviewTarget) object when animating views to or from a separate container view. For example, use this method to animate views to or from a different part of your app’s interface.

## Topics

### Creating a preview target object

[`-  initWithContainer:center:transform:`](/documentation/UIKit/UIPreviewTarget/init(container:center:transform:))

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

[`-  initWithContainer:center:`](/documentation/UIKit/UIPreviewTarget/init(container:center:))

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

### Getting the target attributes

[`container`](/documentation/UIKit/UIPreviewTarget/container)

The container for the view being animated.

[`center`](/documentation/UIKit/UIPreviewTarget/center)

The point in the containing view at which to place the center of the view being animated.

[`transform`](/documentation/UIKit/UIPreviewTarget/transform)

An affine transform to apply to the view being animated.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Inherited By

[`UIDragPreviewTarget`](/documentation/UIKit/UIDragPreviewTarget)

---

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)