CustomSegueDemo icon indicating copy to clipboard operation
CustomSegueDemo copied to clipboard

Adding Tap Gesture to Container is not working

Open kalyanpkumar opened this issue 6 years ago • 3 comments

I need to dismiss the container when clicked on the container view but adding tap gesture to the container is not working. It should be similar to the "top card" dismiss in your tutorial. can you please let us know how and where exactly we need to add tap gesture.

kalyanpkumar avatar Jul 05 '19 13:07 kalyanpkumar

Add your own background view to the container and put your gesture recognizer on it.

wtmoose avatar Jul 05 '19 15:07 wtmoose

Hi Tim! I am trying to get the presented view controller to dismiss as well. I have tried adding a tap gesture recognizer to a) container b) toView and c) my own background view. I have this down arrow/collapse button that for which I'd like to add a target to hide the bottom card.

Calling hide on my root view controller doesn't work. I'm curious to learn how to get the controller to dismiss on button tap. Screenshot provided, thanks for your help ✨

My app

Screen Shot 2019-10-28 at 5 49 43 PM

brandonrhill avatar Oct 29 '19 01:10 brandonrhill

Should be straightforward. Just call dismiss() from the presenting view controller. You can trigger this from your button. Just like in this sample project.

Other than that, I can’t really troubleshoot your issues based on a screenshot.

wtmoose avatar Oct 29 '19 12:10 wtmoose