mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

Add `PreviewViewController`.

Open MaximAlien opened this issue 3 years ago • 46 comments

PR adds PreviewViewController that allows to preview destination and routes and transition to NavigationViewController.

PreviewViewController can be in three states:

  • Browsing
  • Destination(s) preview
  • Route(s) preview

Internally PreviewViewController uses NavigationView similarly to NavigationViewController. Users are able to inject their own bottom banner for each state. At the same time Navigation SDK provides default DestinationPreviewViewController and RoutesPreviewViewController for destination(s) preview and route(s) preview states respectively.

For testing purposes new PreviewViewControllerExample target was created.

Examples:

Simulator Screen Shot - iPhone 13 - 2022-04-06 at 18 00 27

Simulator Screen Shot - iPhone SE (2nd generation) - 2022-04-18 at 00 01 56

Simulator Screen Shot - iPhone SE (2nd generation) - 2022-04-18 at 00 02 08

MaximAlien avatar Feb 21 '22 22:02 MaximAlien

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

InstructionsCardContainerView

  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: Declaration
    From: <Self where Self : VisualInstructionDelegate> (Self) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
    To: (InstructionsCardContainerView) -> (InstructionLabel, VisualInstruction, NSAttributedString) -> NSAttributedString?
  • modified method: label(_:willPresent:as:) in InstructionsCardContainerView
    Type of change: key.doc.result_discussion
    From: [["Para": optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]
    To: [["Para": Optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.]]

FloatingButton

  • removed source.lang.swift.decl.function.method.class: rounded(image:selectedImage:size:) in FloatingButton

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

FloatingButton

  • removed source.lang.swift.decl.function.method.class: rounded(image:selectedImage:size:) in FloatingButton

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

FloatingButton

  • removed source.lang.swift.decl.function.method.class: rounded(image:selectedImage:size:) in FloatingButton

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

FloatingButton

  • removed source.lang.swift.decl.function.method.class: rounded(image:selectedImage:size:) in FloatingButton

No breaking changes detected in MapboxCoreNavigation

Breaking Changes in MapboxNavigation

Breaking API Changes

FloatingButton

  • removed source.lang.swift.decl.function.method.class: rounded(image:selectedImage:size:) in FloatingButton