Handle view interactions

During the lifecycle of the tracking experience, there are various events which happen on HyperTrack map. In order to handle these events, add HTViewInteractionDelegate extension to your view controller.

Method Description
didTapReFocusButton(_ sender: Any, isInfoViewCardExpanded: Bool) Called when ReFocus button is tapped.
didTapBackButton(_ sender: Any) Called when Back button is tapped.
didTapPhoneButton(_ sender: Any) Called when Phone button is tapped.
didTapInfoViewFor(actionID: String) Called when Info view is tapped.
didTapMapView() Called when Map view is tapped.
didPanMapView() Called when Map view is panned.
class MapViewController: UIViewController, HTViewInteractionDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()

        ...

        // Configure view interaction delegate in HyperTrack map
        hyperTrackMap.setHTViewInteractionDelegate(interactionDelegate: self)
    }

    func didTapReFocusButton(_ sender: Any, isInfoViewCardExpanded: Bool) {
        // Handle refocus button tap
  }

    ...
}

Was this helpful? Yes, thanks! Not really

results matching ""

    No results matching ""