Handle view interactions

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

Method Description
didTapReFocusButton(_ sender: Any) 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) {
        // Handle refocus button tap
  }

    ...
}
@interface MapViewController() <HTViewInteractionDelegate>

...

@end

@implementation MapViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    ...

    // Configure view interaction delegate in HyperTrack map
    [map setHTViewInteractionDelegateWithInteractionDelegate:self];

    ...
}

- (void) didTapReFocusButton:(id)sender {
    // Handle refocus button tap
}

...

@end

results matching ""

    No results matching ""