2016-08-31 158 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 { 

}