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

可以限制只需要图片,不需要音频或视频吗。如果可以,该怎样设置呢? #250

Open
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

picker.assetsFilter doesn't exist

@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