ADPhotoKit Documentation

Class ADAlbum​List​Data​Source

public class ADAlbumListDataSource: NSObject  

The data source of album controller. It get albums you request and reload the associate reloadable view when album changed.

%269 ADAlbumListDataSource ADAlbumListDataSource NSObject NSObject ADAlbumListDataSource->NSObject PHPhotoLibraryChangeObserver PHPhotoLibraryChangeObserver ADAlbumListDataSource->PHPhotoLibraryChangeObserver

Conforms To

NSObject
PHPhotoLibraryChangeObserver

Initializers

init(reloadable:​options:​)

public init(reloadable: ADDataSourceReloadable, options: ADAlbumSelectOptions = .default)  

Create data source with associate reloadable view and options.

Parameters

reloadable ADData​Source​Reloadable

Associate reloadable view.

options ADAlbum​Select​Options

Options to limit album type and order. It is ADAlbumSelectOptions.default by default.

Properties

reloadable

public weak var reloadable: ADDataSourceReloadable? 

The associate reloadable view conform to ADDataSourceReloadable.

options

public let options: ADAlbumSelectOptions

Options to set the album type and order.

list

public var list: [ADAlbumModel] = [] 

Albums array request from PHAssetCollection.

Methods

reload​Data(completion:​)

public func reloadData(completion: (() -> Void)? = nil)  

Reload the associate view with fetch albums.

Parameters

completion (() -> Void)?

Called when the reload finished.

photo​Library​Did​Change(_:​)

public func photoLibraryDidChange(_ changeInstance: PHChange)