JoinedDataProvider
public final class JoinedDataProvider<Element> : DataProvider
Takes multiple data provider and aggregates them into a single on.
-
Creates an instance of
JoinedDataProvider
by aggregating all given data providersDeclaration
Swift
public init<D>(dataProviders: [D]) where Element == D.Element, D : DataProvider
Parameters
dataProviders
the data providers to aggregate.
-
An observable where one can subscribe to changes of data provider.
Declaration
Swift
public var observable: DataProviderObservable { get }
-
Returns an object for a given index path.
Declaration
Swift
public 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
public func numberOfItems(inSection section: Int) -> Int
Parameters
section
the section.
Return Value
number of items in the given section.
-
Declaration
Swift
public func numberOfSections() -> Int
Return Value
the number of sections.