Skip to content

ADAlbumListDataSource

duzexu edited this page May 28, 2021 · 2 revisions

ADAlbumListDataSource

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

public class ADAlbumListDataSource: NSObject 

Inheritance

NSObject, PHPhotoLibraryChangeObserver

Initializers

init(reloadable:options:)

Create data source with associate reloadable view and options.

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

Parameters

  • reloadable: Associate reloadable view.
  • options: Options to limit album type and order. It is ADAlbumSelectOptions.default by default.

Properties

reloadable

The associate reloadable view conform to ADDataSourceReloadable.

public weak var reloadable: ADDataSourceReloadable?

options

Options to set the album type and order.

public let options: ADAlbumSelectOptions

list

Albums array request from PHAssetCollection.

public var list: [ADAlbumModel] = []

Methods

reloadData(completion:)

Reload the associate view with fetch albums.

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

Parameters

  • completion: Called when the reload finished.

photoLibraryDidChange(_:)

public func photoLibraryDidChange(_ changeInstance: PHChange) 
Types
Protocols
Global Typealiases
Operators
Extensions

Clone this wiki locally