qmathe / DropDownMenuKit

UIKit drop down menu, simple yet flexible and written in Swift
Other
302 stars 38 forks source link

spam on DropDownTitleView #1

Closed Fredehagelund92 closed 8 years ago

Fredehagelund92 commented 8 years ago

When i quickly multiple tap DropDownTitleView it seem to create a thing. where u need to multiple tap in order to get it to drop down?

qmathe commented 8 years ago

What do you mean by 'a thing' precisely?

Multiple taps on the title view should trigger the menu appearance/disappearance animation multiple times.

By default, the title view toggles the menu visibility on a single tap. If you want to change this to get the menu drops down on a double tap, you can replace the gesture recognizer attached to the title view. For example:

let recognizer = UITapGestureRecognizer(target: titleView, action: #selector(DropDownTitleView.toggleMenu))

recognizer.numberOfTapsRequired = 2
titleView.gestureRecognizers = [recognizer]

I should probably add an API to expose the tap gesture recognizer explicitly to DropDownTitleView.

Fredehagelund92 commented 8 years ago

What i mean is that if i quick fast 3 times on the DropDownTitleMenu it will trigger so that the arrow think that the view is shown however it is hided. Therefore i need to press 2 times before it will be back to desired

qmathe commented 8 years ago

Thanks for the detailed explanation! I was able to reproduce the bug you describe. I'm away until Tuesday, I'll commit a fix when I come back next week.

qmathe commented 8 years ago

Should be fixed now with 2ac64d535587f8bcc6e9748249dd4ba2bf164852

Thanks for the bug report!