CarPlaySearchControllerDelegate

@available(iOS 12.0, *)
public protocol CarPlaySearchControllerDelegate : AnyObject

Delegate, which is used to control behavior based on certain actions from the user when performing search on CarPlay.

  • Method, which is called whenever user selects search result.

    Declaration

    Swift

    func previewRoutes(to waypoint: Waypoint, completionHandler: @escaping () -> Void)

    Parameters

    waypoint

    Waypoint instance, which contains information regarding destination.

    completionHandler

    A block object to be executed when route preview finishes.

  • Method, which is called whenever CPSearchTemplate is presented to give user the opportunity to change CPMapTemplate.mapButtons.

    Declaration

    Swift

    func resetPanButtons(_ mapTemplate: CPMapTemplate)

    Parameters

    mapTemplate

    CPMapTemplate object, on the trailing bottom corner of which an array of bar buttons will be displayed.

  • Method, which is called whenever CPSearchTemplate is presented.

    Declaration

    Swift

    func pushTemplate(_ template: CPTemplate, animated: Bool)

    Parameters

    template

    CPSearchTemplate instance.

    animated

    Boolean flag which determines whether CPSearchTemplate presentation push will be animated or not.

  • Method, which is called whenever user selects CPListItem with destination and CPSearchTemplate is being dismissed.

    Declaration

    Swift

    func popTemplate(animated: Bool)

    Parameters

    animated

    Boolean flag which determines whether CPSearchTemplate dismissal is animated or not.