I'm trying to implement a long press on a mapView in Swift (to achieve this)
I don't get any compiler errors but when I do the longpress in the simulator the app crashes with "unrecognized selector sent to instance"
I suspect it's something to do with selectors (similar to this) but every combination I've tried fails
I have this in viewDidLoad:
var lpgr = UILongPressGestureRecognizer(target: self, action: "action")
lpgr.minimumPressDuration = 2.0;
mapView.addGestureRecognizer(lpgr)
and this in the ViewController class:
func action(gestureRecognizer:UIGestureRecognizer) {
println("long press")
}