Observable
public protocol Observable
Observable is an interface for a container of observers.
It allows sending notifications on certain events to all of the added observers.
We provide the implementation of this protocol: TomTomSDKCommon/ObservableHandler.
-
Notify observers about some specific event.
Declaration
Swift
func notifyObservers(notificationAction: @escaping (Observer) -> ())Parameters
notificationActionUse the closure to define what event every observer will receive. This method applies the
notificationActionclosure to every added observer. -
Notify observers about some specific event.
Declaration
Swift
func notifyObservers(notificationAction: @escaping (Observer) -> (), completion: (() -> ())?)Parameters
notificationActionUse the closure to define what event every observer will receive. This method applies the
notificationActionclosure to every added observer.completionCalled when the
notificationActionclosure is applied to all the added observers.
TomTom SDK for iOS (0.51.1)
Observable