I have the simple iOS app open the map from our enterprise portal by using ArcGIS Runtime SDK.
// MARK: - AGSGeoViewTouchDelegate
func geoView(_ geoView: AGSGeoView, didTapAtScreenPoint screenPoint: CGPoint, mapPoint: AGSPoint) {
print("AGSGeoViewTouchDelegate Event")
guard let featureLayer = self.featureLayer else { return }
print("featureLayer is not null")
// Identify the specified feature layer.
mapView.identifyLayer(featureLayer, screenPoint: screenPoint, tolerance: 12, returnPopupsOnly: false) { [weak self] (result: AGSIdentifyLayerResult) in
guard let self = self else { return }
if let error = result.error {
self.presentAlert(message: "Error Display Feature popup")
print(error)
} else if !result.popups.isEmpty {
// Unselect the previous feature.
featureLayer.clearSelection()
// Select the new feature.
let features = result.geoElements as? [AGSFeature]
let selectedFeature = features?.first
featureLayer.select(selectedFeature!)
// Display a popup only if it exists.
let popupsViewController = AGSPopupsViewController(popups: result.popups)
// Display the popup as a formsheet -- specified for iPads.
popupsViewController.modalPresentationStyle = .formSheet
// Present the popup.
popupsViewController.delegate = self
self.present(popupsViewController, animated: true)
}
}
}
In the popup, there is some content is a URL. I want to capture the movement when user tap on the link. I will do some other action or redirect to some where else. How can I do it?