Reputation: 34830
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?
Upvotes: 1
Views: 174
Reputation: 58149
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
}
Upvotes: 2