IOS ArcGis Map 中的长按手势
Long Press Gesture in ArcGis Map in IOS
我在 ios 应用程序中使用 ArcGis Map。我正在尝试对其应用长按手势。但是我收到错误 Value of type 'BCBaseMapView?' has no member 'addGestureRecognizer'
。我如何在上面添加长手势。这就是我在其中编码的内容。
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress))
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
// lpgr.delegate = self
self.mapView.addGestureRecognizer(lpgr)
@objc func handleLongPress(sender: UILongPressGestureRecognizer)
{
print("longpressed")
self.addWaypointOnMap()
}
这是我的代码,我在这一行遇到了错误。
self.mapView.addGestureRecognizer(lpgr)
这是我的 mapView
var mapView: BCBaseMapView?
如果 BCBaseMapView 的超级视图是 MKMapView 然后尝试使用以下方式将其添加到超级视图:
self.mapView.super.addGestureRecognizer(lpgr)
或
self.mapView.superview.addGestureRecognizer(lpgr)
我在 ios 应用程序中使用 ArcGis Map。我正在尝试对其应用长按手势。但是我收到错误 Value of type 'BCBaseMapView?' has no member 'addGestureRecognizer'
。我如何在上面添加长手势。这就是我在其中编码的内容。
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress))
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
// lpgr.delegate = self
self.mapView.addGestureRecognizer(lpgr)
@objc func handleLongPress(sender: UILongPressGestureRecognizer)
{
print("longpressed")
self.addWaypointOnMap()
}
这是我的代码,我在这一行遇到了错误。
self.mapView.addGestureRecognizer(lpgr)
这是我的 mapView
var mapView: BCBaseMapView?
如果 BCBaseMapView 的超级视图是 MKMapView 然后尝试使用以下方式将其添加到超级视图:
self.mapView.super.addGestureRecognizer(lpgr)
或
self.mapView.superview.addGestureRecognizer(lpgr)