TopBannerViewControllerDelegate
public protocol TopBannerViewControllerDelegate : VisualInstructionDelegate
TopBannerViewControllerDelegate
provides methods for reacting to the user interactions with
TopBannerViewController
. Such interactions include:
InstructionsBannerView
swiping to the left, right, top and bottom.StepTableViewCell
selection.- Display or dismissal of
StepsViewController
, which shows list of remaining legs and steps.
-
topBanner(_:didSwipeInDirection:)
Default implementationA method that is invoked when the user swipes
InstructionsBannerView
in a certain direction.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func topBanner(_ banner: TopBannerViewController, didSwipeInDirection direction: UISwipeGestureRecognizer.Direction)
Parameters
banner
The
TopBannerViewController
instance.direction
Direction, in which swiping was performed: (either
.left
,.right
,.top
or.bottom
). -
topBanner(_:didSelect:stepIndex:cell:)
Default implementationA method that is invoked when the user selects certain step in a
TopBannerViewController
drop-down menu.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func topBanner(_ banner: TopBannerViewController, didSelect legIndex: Int, stepIndex: Int, cell: StepTableViewCell)
Parameters
banner
The
TopBannerViewController
instance.legIndex
The zero-based index of the currently active leg along the active route.
stepIndex
The zero-based index of the currently active step along the active route.
cell
The
StepTableViewCell
instance, which contains visual information regarding maneuver. -
topBanner(_:willDisplayStepsController:)
Default implementationTells the delegate the
TopBannerViewController
is about to display aStepsViewController
as a drop-down.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func topBanner(_ banner: TopBannerViewController, willDisplayStepsController: StepsViewController)
Parameters
banner
The
TopBannerViewController
instance.willDisplayStepsController
The
StepsViewController
instance, which is about to be shown as a drop-down. -
topBanner(_:didDisplayStepsController:)
Default implementationTells the delegate the
TopBannerViewController
thatStepsViewController
was displayed as a drop-down.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func topBanner(_ banner: TopBannerViewController, didDisplayStepsController: StepsViewController)
Parameters
banner
The
TopBannerViewController
instance.didDisplayStepsController
The
StepsViewController
instance, which was displayed as a drop-down. -
topBanner(_:willDismissStepsController:)
Default implementationTells the delegate the
TopBannerViewController
is about to dismiss and hide aStepsViewController
drop-down.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func topBanner(_ banner: TopBannerViewController, willDismissStepsController: StepsViewController)
Parameters
banner
The
TopBannerViewController
instance.willDismissStepsController
The
StepsViewController
instance, which is about to be dismissed. -
topBanner(_:didDismissStepsController:)
Default implementationTells the delegate the
TopBannerViewController
thatStepsViewController
was dismissed.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func topBanner(_ banner: TopBannerViewController, didDismissStepsController: StepsViewController)
Parameters
banner
The
TopBannerViewController
instance.didDismissStepsController
The
StepsViewController
instance, which was dismissed.