Class
ADAlbumListDataSource
public class ADAlbumListDataSource: NSObject
The data source of album controller. It get albums you request and reload the associate reloadable view when album changed.
Relationships
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
Name | Type | Description |
---|---|---|
reloadable | ADDataSourceReloadable |
Associate reloadable view. |
options | ADAlbumSelectOptions |
Options to limit album type and order. It is |
Properties
reloadable
public weak var reloadable: ADDataSourceReloadable?
The associate reloadable view conform to ADDataSourceReloadable
.
Methods
reloadData(completion:)
public func reloadData(completion: (() -> Void)? = nil)
Reload the associate view with fetch albums.
Parameters
Name | Type | Description |
---|---|---|
completion | (() -> Void)? |
Called when the reload finished. |
photoLibraryDidChange(_:)
public func photoLibraryDidChange(_ changeInstance: PHChange)