-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add UITapGesture to close menu #26
Comments
You may need to set up a view to detect the use click outside the menu when it expanding. And control the |
I got it! Thanks! This whole time I thought .expanding is a get only function for some reason... |
I'm still having trouble to achieve goal. When I add a tap gesture recognizer, the dropdown menu becomes disabled. Any suggestions how I can add the tap gesture outside the menu frame? |
I'm trying to do this with the code below: ` func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldReceiveTouch touch: UITouch) -> Bool {
// self.view.removeGestureRecognizer(dropDownMenuTap) // return false
I have 6 options in categoryMenu, the output is all correct except when I tap on the last two columns in the menu, which is super weird, any thoughts maybe? |
Alright, I finally solved it with this https://gist.github.com/sburlot/9856a15119985a6f1a87 kind of code. I couldn't figure out why the menu's frame was wrong when touch is detected, so i just manually added 85 to its height to make it longer. |
If anyone else has a better way of doing this, please share! |
HI i am working with this app but i am unable to show the Drop down. I am using storyboard how can i show when i click on button. |
@chinnuios This is different issue, please create another issue for your question. And it's better to provide more detail and code about how you use it. |
I've been trying to figure out how to close the menu when user taps somewhere on the screen. When users don't pick an option, or try to type something in a textField, I want to close the menu to keep the UI clean. How can I achieve this?
The text was updated successfully, but these errors were encountered: