ios - Passing an existing and active gesture recognizer to a modal view controller -
i want launch modal view long press, , dismiss modal view when long press cancelled. how do this? i tried passing longpressrecognizer modal view , setting delegate, didn't work. i tried simpler- detecting touchesended, mean in modal view touch ended, doesn't fire either. is there way tell modal view gesture has started; want recognize end/cancellation of gesture or touch? viewcontroller.swift import uikit class viewcontroller: uiviewcontroller, uigesturerecognizerdelegate { var buttonview:uiview! var longpressrecognizer:uilongpressgesturerecognizer! override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. self.longpressrecognizer = uilongpressgesturerecognizer(target: self, action: "longpressed:") self.longpressrecognizer.delegate = self self.view.addgesturerecognizer(self.longpressrecognizer) // add button buttonview = uiview(frame:...