RouteProgressSource
public protocol RouteProgressSource
-
The most recent
RouteProgressavailable When possible, useaddRouteProgressObserverinstead of relying on this value, which may be inconsistent during e.g. navigation initializationDeclaration
Swift
var currentRouteProgress: RouteProgress? { get } -
Add an observer which will receive
RouteProgressupdates. If navigation is active, the observer will be called with the currentRouteProgressstate immediately. If it is not active, then the observer will be called with anilvalue.This class only holds a weak reference to the observer. To remove the observer before it is deallocated, pass the observer to
removeRouteProgressObserverAll callbacks are guaranteed to happen on the main thread.Declaration
Swift
func addRouteProgressObserver(observer: RouteProgressObserver) -
Remove a
RouteProgressobserver, before it is deallocatedDeclaration
Swift
func removeRouteProgressObserver(observer: RouteProgressObserver)
RouteProgressSource Protocol Reference