AnyDataProvider
open class AnyDataProvider<Element> : DataProvider
Type erases a DataProvider.
See also
DataProvider
-
An observable where one can subscribe to changes of the data provider.
Declaration
Swift
public var observable: DataProviderObservable
-
Type erases a DataProvider.
Declaration
Swift
public init<D>(_ dataProvider: D) where Element == D.Element, D : DataProvider
Parameters
dataProvider
the data provider to type erase
-
Returns an object for a given index path.
Declaration
Swift
open func object(at indexPath: IndexPath) -> Element
Parameters
indexPath
the index path to get the object for.
Return Value
the object at the given index path.
-
Returns the number of items in a given section.
Declaration
Swift
open func numberOfItems(inSection section: Int) -> Int
Parameters
section
the section.
Return Value
number of items in the given section.
-
Return the number of sections.
Declaration
Swift
open func numberOfSections() -> Int
Return Value
the number of sections.