ObservableHandler
public final class ObservableHandler : Observable
                A 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.Declaration
Swift
public init( dispatchQueue: DispatchQueue = .main, onFirstObserverAdded: (() -> ())? = nil, onLastObserverRemoved: (() -> ())? = nil ) 
- 
                  
                  
Notify observers about some specific event.
Declaration
Swift
public func notifyObservers(notificationAction: @escaping (Observer) -> (), completion: (() -> ())?)Parameters
notificationActionUse the closure to define what event every observer will receive. This method will apply the
notificationActionclosure to every registered observer.completionCalled when the
notificationActionclosure is applied to all the registered observers. - 
                  
                  
Notify observers about some specific event.
Declaration
Swift
public func notifyObservers(notificationAction: @escaping (Observer) -> ())Parameters
notificationActionUse the closure to define what event every observer will receive. This method will apply the
notificationActionclosure to every registered observer. - 
                  
                  
Register an
ObserverforObservableobject.Declaration
Swift
public func addObserver(_ observer: Observer)Parameters
observerObserverto register. - 
                  
                  
Unregister an
ObserverfromObservableobject.Declaration
Swift
public func removeObserver(_ observer: Observer)Parameters
observerObserverto unregister. 
        
 
          TomTom SDK for iOS (0.40.0)
        
          ObservableHandler