---
title: UIViewControllerPreviewing
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uiviewcontrollerpreviewing
---

# UIViewControllerPreviewing

A set of methods that define the interface for configuring a previewing view controller on devices that support 3D Touch.

## Declaration

```swift
@MainActor protocol UIViewControllerPreviewing : NSObjectProtocol
```

## Overview

Overview The system returns a context object conforming to this protocol when you call a view controller’s registerForPreviewing(with:sourceView:) method. This method registers the view controller to participate in 3D Touch preview (peek) and commit (pop) behaviors. note: The end-user terminology for the views presented during the phases of force-based touches includes peek and pop. For clarity here, and to align with the API names, this document uses the corresponding terms preview and commit view. To learn about 3D Touch, read Adopting 3D Touch on iPhone. important: Don’t adopt this protocol in custom classes.

## Topics

### Configuring a source view for a 3D Touch previewing view controller

- [sourceRect](uikit/uiviewcontrollerpreviewing/sourcerect.md)
- [previewingGestureRecognizerForFailureRelationship](uikit/uiviewcontrollerpreviewing/previewinggesturerecognizerforfailurerelationship.md)

### Accessing properties of a 3D Touch previewing view controller

- [delegate](uikit/uiviewcontrollerpreviewing/delegate.md)
- [sourceView](uikit/uiviewcontrollerpreviewing/sourceview.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated protocols

- [UIActionSheetDelegate](uikit/uiactionsheetdelegate.md)
- [UIAlertViewDelegate](uikit/uialertviewdelegate.md)
- [UIPopoverControllerDelegate](uikit/uipopovercontrollerdelegate.md)
- [UISearchDisplayDelegate](uikit/uisearchdisplaydelegate.md)
- [UIViewControllerPreviewingDelegate](uikit/uiviewcontrollerpreviewingdelegate.md)
