Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up RouteController user info keys #2290

Merged
merged 4 commits into from
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions MapboxCoreNavigation/CoreConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,47 +119,47 @@ public extension Notification.Name {
/**
Posted when `RouteController` receives a user location update representing movement along the expected route.

The user info dictionary contains the keys `MBRouteControllerRouteProgressKey` and `MBRouteControllerLocationKey`.
The user info dictionary contains the keys `RouteControllerNotificationUserInfoKey.routeProgressKey` and `RouteControllerNotificationUserInfoKey.locationKey`.
*/
static let routeControllerProgressDidChange: Notification.Name = .init(rawValue: "RouteControllerProgressDidChange")

/**
Posted after the user diverges from the expected route, just before `RouteController` attempts to calculate a new route.

The user info dictionary contains the key `MBRouteControllerLocationKey`.
The user info dictionary contains the key `RouteControllerNotificationUserInfoKey.locationKey`.
*/
static let routeControllerWillReroute: Notification.Name = .init(rawValue: "RouteControllerWillReroute")

/**
Posted when `RouteController` obtains a new route in response to the user diverging from a previous route.

The user info dictionary contains the keys `MBRouteControllerLocationKey` and `MBRouteControllerIsProactiveKey`.
The user info dictionary contains the keys `RouteControllerNotificationUserInfoKey.locationKey` and `RouteControllerNotificationUserInfoKey.isProactiveKey`.
*/
static let routeControllerDidReroute: Notification.Name = .init(rawValue: "RouteControllerDidReroute")

/**
Posted when `RouteController` fails to reroute the user after the user diverges from the expected route.

The user info dictionary contains the key `MBRouteControllerRoutingErrorKey`.
The user info dictionary contains the key `RouteControllerNotificationUserInfoKey.routingErrorKey`.
*/
static let routeControllerDidFailToReroute: Notification.Name = .init(rawValue: "RouteControllerDidFailToReroute")

/**
Posted when `RouteController` detects that the user has passed an ideal point for saying an instruction aloud.

The user info dictionary contains the key `MBRouteControllerRouteProgressKey`.
The user info dictionary contains the key `RouteControllerNotificationUserInfoKey.routeProgressKey`.
*/
static let routeControllerDidPassSpokenInstructionPoint: Notification.Name = .init(rawValue: "RouteControllerDidPassSpokenInstructionPoint")

/**
Posted when `RouteController` detects that the user has passed an ideal point for display an instruction visually.

The user info dictionary contains the key `MBRouteControllerRouteProgressKey`.
The user info dictionary contains the key `RouteControllerNotificationUserInfoKey.routeProgressKey`.
*/
static let routeControllerDidPassVisualInstructionPoint: Notification.Name = .init(rawValue: "MBRouteControllerDidPassVisualInstructionPoint")

/**
Posted when something changes in the shared `MBNavigationSettings` object.
Posted when something changes in the shared `NavigationSettings` object.

The user info dictionary indicates which keys and values changed.

Expand Down Expand Up @@ -201,12 +201,12 @@ public struct RouteControllerNotificationUserInfoKey: Hashable, Equatable, RawRe
public static let routingErrorKey: RouteControllerNotificationUserInfoKey = .init(rawValue: "error")

/**
A key in the user info dictionary of an `routeControllerDidPassVisualInstructionPoint`. The corresponding value is an `MBVisualInstruction` object representing the current visual instruction.
A key in the user info dictionary of an `routeControllerDidPassVisualInstructionPoint`. The corresponding value is an `VisualInstruction` object representing the current visual instruction.
*/
public static let visualInstructionKey: RouteControllerNotificationUserInfoKey = .init(rawValue: "visualInstruction")

/**
A key in the user info dictionary of a `routeControllerDidPassSpokenInstructionPoint` notification. The corresponding value is an `MBSpokenInstruction` object representing the current visual instruction.
A key in the user info dictionary of a `routeControllerDidPassSpokenInstructionPoint` notification. The corresponding value is an `SpokenInstruction` object representing the current visual instruction.
*/
public static let spokenInstructionKey: RouteControllerNotificationUserInfoKey = .init(rawValue: "spokenInstruction")

Expand Down
2 changes: 1 addition & 1 deletion MapboxNavigation/Style.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ open class Style: NSObject {

/**
:nodoc:
`MBButton` sets the tintColor according to the style.
`Button` sets the tintColor according to the style.
*/
@objc(MBButton)
open class Button: StylableButton { }
Expand Down