0
AssetGridModel Inherit the PHAsset Klasse und fügen Sie die isSelected EigenschaftWie die PHAsset Klasse erben, und fügen Sie Attribute
fileprivate var fetchResult: [AssetGridModel]!
let allPhotosOptions = PHFetchOptions()
allPhotosOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
let fetchAssets = PHAsset.fetchAssets(with: allPhotosOptions)
oder
let fetchAssets = AssetGridModel.fetchAssets(with: allPhotosOptions)
Warum ich aus dem Art gekommen sind PHAsset sind, nicht ich hat die Vererbungsklasse geschrieben und kann die hinzugefügten Attribute nicht ändern?
Bitte teilen Sie mir, danke