Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Tap Gesture to Container is not working #1

Open
kalyanpkumar opened this issue Jul 5, 2019 · 3 comments
Open

Adding Tap Gesture to Container is not working #1

kalyanpkumar opened this issue Jul 5, 2019 · 3 comments

Comments

@kalyanpkumar
Copy link

kalyanpkumar commented Jul 5, 2019

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.

@wtmoose
Copy link
Member

wtmoose commented Jul 5, 2019

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

@brandonrhill
Copy link

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

@wtmoose
Copy link
Member

wtmoose commented Oct 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants