DataProviderObservable
public protocol DataProviderObservable : AnyObject
A observable which notifies about data provider changes.
-
Observe the changes of a data provider.
Can be use to animate changes in a TableView or in any other view hirachy.
Declaration
Swift
@discardableResult func addObserver(observer: @escaping (DataProviderChange) -> Void) -> NSObjectProtocol
Parameters
observer
gets called when updates are available. If nil the DataProvider could not calculate the updates, but new data is available. Reload your view when this happens. To unregister call
removeObserver
Return Value
An opaque object to act as the observer.
-
Removes given observer from the receiver’s dispatch table.
Declaration
Swift
func removeObserver(observer: NSObjectProtocol)
Parameters
observer
The observer to remove