PHPickerViewController
A view controller that provides the user interface for choosing assets from the photo library.
Declaration
class PHPickerViewControllerMentioned in
Overview
The PHPickerViewController class is an alternative to 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 UIImagePickerController
Configuration of the picker to display only Live Photos
Availability of 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 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. Its view hierarchy belongs to the system and therefore, the framework provides no access.