2016-08-31 159 views

回答

1

可分解这样PHAssetMediaType.ImagePHAssetMediaType.Video

获取所有资产,然后再转只读取范围您的需要

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

} 

also check apple documentation

1

在迅速,PHAssetMediaTypeImage只是.ImagePHAssetMediaTypeVideo只是.Video

if asset.mediaType == .Image { 

} 

if asset.mediaType == .Video { 

}