ArrayDataSource
open class ArrayDataSource<Type> : NSObject where Type : Equatable
Array-based generic data source having elements of type Type.
-
DataProviderfor this object. As ArrayDataSource is array-based, the data provider is array-based as well.Declaration
Swift
open var dataProvider: ArrayDataProvider<Type> -
Block to be called whenever
refresh()method is called.Declaration
Swift
open var onRefresh: (() -> Void)?
-
Inits with given
DataProvider.Declaration
Swift
public init(with dataProvider: ArrayDataProvider<Type>)Parameters
dataProviderThe array-based Data provider.
-
Propagates through
onRefresha refresh for interested objects.Declaration
Swift
open func refresh() -
Returns the object at the given
indexPathrow, if exists.Declaration
Swift
open func object(at indexPath: IndexPath) -> Type?Parameters
atThe index path.
Return Value
The object of type
Typeat givenindexPathrow, ornilif not found.
View on GitHub
ArrayDataSource Class Reference