I'm creating an app that consists of a view controller and a MapView within it. I also added a longPressGestureRecognizer and connected it to an outlet and an action method that look like this:
- (IBAction)addPin:(UILongPressGestureRecognizer *)sender {
//some code
}
The problem is that this method is never called, and I can't figure out why. I can clearly see that it really is connected to the gestureRecognizer. Why isn't it working?
I've done this:
- Added a MapView to my view controller in the StoryBoard.
- Added the longpressGestureRecognizer to the view controller in the storyboard.
- Connected the longPressRecognizer to an outlet.
- Connected the longPressRecognizer to the method described above.
I've read many other posts about this but nothing is working. A stränge thing is that the metod gets call when using an id-method.
Hank