Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only want photo,don't need video or audio,how can i do? #249

Open
Erikess opened this issue Aug 30, 2017 · 3 comments
Open

only want photo,don't need video or audio,how can i do? #249

Erikess opened this issue Aug 30, 2017 · 3 comments

Comments

@Erikess
Copy link

Erikess commented Aug 30, 2017

if i only want photo,don't need video or audio,what's can i do?

@TheLittleBoy
Copy link

picker.assetsFilter = [ALAssetsFilter allPhotos];

@long1eu
Copy link

long1eu commented Dec 27, 2017

can't find assetsFilter

@yiyezhiqiu1024
Copy link

// use image
// let pridicate = NSPredicate(format: "mediaType == %d", PHAssetMediaType.image.rawValue)
// use video
let pridicate = NSPredicate(format: "mediaType == %d", PHAssetMediaType.video.rawValue)
let fetchOptions = PHFetchOptions()
fetchOptions.predicate = predicate
picker.assetsFetchOptions = fetchOptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants