I'm building an app that deals with images taken in Portrait Mode (Depth Effect). I need to present UIImagePickerController
to only display photos that have depth effect.
How do I achieve this?
I'm building an app that deals with images taken in Portrait Mode (Depth Effect). I need to present UIImagePickerController
to only display photos that have depth effect.
How do I achieve this?
This is not possible with the public methods of UIImagePickerController
. Use a custom image picker for this.
For checking if a specific PHAsset
has a depth effect, check whether its mediaSubtypes
property is equal to .photoDepthEffect
:
if asset.mediaSubtypes == .photoDepthEffect {
//live photo
}