ObservableHandler
public final class ObservableHandler : ObservableA thread-safe implementation of the Observable container.
Any method can be called from any queue. The notification of observers, completions, and other closures will be executed on a dispatch queue provided in the init method.
Note
If you rely on the onLastObserverRemoved closure, callremoveObserver(:) explicitly.
If the observer is destroyed without an explicit call to removeObserver(:), the onLastObserverRemoved call will be delayed
until the next notify event when we detect that the last observer is nil and remove it.
- 
                  
                  Create an ObservableHandlerinstance.DeclarationSwift public init( dispatchQueue: DispatchQueue = .main, onFirstObserverAdded: (() -> ())? = nil, onLastObserverRemoved: (() -> ())? = nil )
- 
                  
                  Notify observers about some specific event. DeclarationSwift public func notifyObservers(notificationAction: @escaping (Observer) -> (), completion: (() -> ())?)ParametersnotificationActionUse the closure to define what event every observer will receive. This method will apply the notificationActionclosure to every added observer.completionCalled when the notificationActionclosure is applied to all the added observers.
- 
                  
                  Notify observers about some specific event. DeclarationSwift public func notifyObservers(notificationAction: @escaping (Observer) -> ())ParametersnotificationActionUse the closure to define what event every observer will receive. This method will apply the notificationActionclosure to every added observer.
- 
                  
                  Add an ObserverforObservableobject.DeclarationSwift public func addObserver(_ observer: Observer)ParametersobserverObserverto add.
- 
                  
                  Remove an ObserverfromObservableobject.DeclarationSwift public func removeObserver(_ observer: Observer)ParametersobserverObserverto remove.
 
         TomTom SDK for iOS (0.53.1)
 
          TomTom SDK for iOS (0.53.1)
         ObservableHandler
          ObservableHandler