Sazzad Hissain Khan Sazzad Hissain Khan - 1 year ago 136
Swift Question

Use of Unresolved Identifier 'PHAssetMediaTypeImage'

I am using PHAsset in swift.

PHAssetMediaTypeImage
is not resolved. Can anyone help.

enter image description here

Answer Source

Resolvable this way PHAssetMediaType.Image and PHAssetMediaType.Video

fetch all assets, then sub fetch only the range your need

    var assets = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: fetchOptions){

}

also check apple documentation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download