<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotosUI/PHPickerViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(cs)PHPickerViewController"
  },
  "title" : "PHPickerViewController"
}
-->

# PHPickerViewController

A view controller that provides the user interface for choosing assets from the photo library.

```
class PHPickerViewController
```

## Overview

The `PHPickerViewController` class is an alternative to <doc://com.apple.documentation/documentation/UIKit/UIImagePickerController>. `PHPickerViewController` improves stability and reliability, and includes several benefits to developers and users, such as the following:

- Deferred image loading and recovery UI
- Reliable handling of large and complex assets, like RAW and panoramic images
- User-selectable assets that aren’t available for <doc://com.apple.documentation/documentation/UIKit/UIImagePickerController>
- Configuration of the picker to display only Live Photos
- Availability of [`PHLivePhoto`](/documentation/Photos/PHLivePhoto) objects without library access
- Stricter validations against invalid inputs

### Observe required viewing standards

As a view controller that the system renders on top of your app, the picker controller requires certain prerequisites for operation that your app needs to observe:

- The picker controller disables user interaction if an app alters its visibility, such as by adjusting the <doc://com.apple.documentation/documentation/QuartzCore/CALayer/opacity> of its view’s layer. In iOS 17 and later, the picker controller ignores touch events while its opacity is anything other than fully opaque.
- As a system-rendered UI, you can’t subclass [`PHPickerViewController`](/documentation/PhotosUI/PHPickerViewController). Its view hierarchy belongs to the system and therefore, the framework provides no access.

## Topics

### Creating a picker

[`init(configuration:)`](/documentation/PhotosUI/PHPickerViewController/init(configuration:))

Creates a new picker view controller with the configuration you specify.

[`PHPickerConfiguration`](/documentation/PhotosUI/PHPickerConfiguration-swift.struct)

An object that contains information about how to configure a picker view controller.

[`-  initWithConfiguration:`](/documentation/PhotosUI/PHPickerViewController/initWithConfiguration:)

Creates a new picker view controller with the configuration you specify.

[`PHPickerConfiguration`](/documentation/PhotosUI/PHPickerConfiguration-c.class)

An object that contains information about how to configure a picker view controller.

### Managing the configuration

[`configuration`](/documentation/PhotosUI/PHPickerViewController/configuration-17a8p)

The configuration you specify when creating the picker.

[`updatePicker(using:)`](/documentation/PhotosUI/PHPickerViewController/updatePicker(using:))

Customizes your app’s photo picker according to the given configuration.

[`configuration`](/documentation/PhotosUI/PHPickerViewController/configuration-3vf53)

The configuration you specify when creating the picker.

[`-  updatePickerUsingConfiguration:`](/documentation/PhotosUI/PHPickerViewController/updatePickerUsingConfiguration:)

Customizes your app’s photo picker according to the given configuration.

### Setting content position and scale

[`-  scrollToInitialPosition`](/documentation/PhotosUI/PHPickerViewController/scrollToInitialPosition())

Resets the visible photo thumbnails by scrolling the view to the picker’s initial position.

[`-  zoomIn`](/documentation/PhotosUI/PHPickerViewController/zoomIn())

Changes the picker’s content scale by making the photo thumbnails larger in the view.

[`-  zoomOut`](/documentation/PhotosUI/PHPickerViewController/zoomOut())

Changes the picker’s content scale by making the photo thumbnails smaller in the view.

### Responding to user selection

[`delegate`](/documentation/PhotosUI/PHPickerViewController/delegate-3zqmt)

The picker’s delegate object.

[`PHPickerViewControllerDelegate`](/documentation/PhotosUI/PHPickerViewControllerDelegate-5yntc)

A set of methods that the delegate must implement to respond to `PHPickerViewController` user events.

[`PHPickerResult`](/documentation/PhotosUI/PHPickerResult-swift.struct)

Types that represent a selected asset from a person’s photo library.

[`delegate`](/documentation/PhotosUI/PHPickerViewController/delegate-8dlnb)

The picker’s delegate object.

[`PHPickerViewControllerDelegate`](/documentation/PhotosUI/PHPickerViewControllerDelegate-9y5xc)

A protocol the picker uses to communicate user selections.

[`PHPickerResult`](/documentation/PhotosUI/PHPickerResult-c.class)

Types that represent a selected asset from a person’s photo library.

### Deselecting assets

[`-  deselectAssetsWithIdentifiers:`](/documentation/PhotosUI/PHPickerViewController/deselectAssets(withIdentifiers:))

Deselects assets that are in a selected state.

### Reordering assets

[`-  moveAssetWithIdentifier:afterAssetWithIdentifier:`](/documentation/PhotosUI/PHPickerViewController/moveAsset(withIdentifier:afterAssetWithIdentifier:))

Reorders assets that are in a selected state.

## Relationships

### Conforms To

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

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

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

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

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

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

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

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

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

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

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

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

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

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

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

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

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

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

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

[`NSSeguePerforming`](/documentation/AppKit/NSSeguePerforming)

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

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

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

[`NSEditor`](/documentation/AppKit/NSEditor)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

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

### Inherits From

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

[`NSViewController`](/documentation/AppKit/NSViewController)

---

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)