50ButtonsEach / fliclib-ios

The fliclib framework for iOS
35 stars 5 forks source link

Double click event never happens #17

Closed dukhanov closed 8 years ago

dukhanov commented 8 years ago

I am trying to subscribe to a double click event, But a double click event never happens. I've forked your repository, and added subscribers to events

- buttonClick
- buttonDoubleClick
- buttonHold

buttonClick event is happened buttonHoldevent is happened

but buttonDoubleClicknever is happened

If I double click on flic, I received two buttonClick events instead one buttonDoubleClick event

Could you tell me what am I doing wrong?

https://github.com/dukhanov/ios-boilerplate-objc/commit/5288d40690ef7f9e26a20dd0cfaa1c638069d7a8

AntonMeier commented 8 years ago

You need to set the triggerBehavior property of the button to SCLFlicButtonTriggerBehaviorClickAndDoubleClickAndHold

dukhanov commented 8 years ago

Thanks it helped.

If I understood correctly, I need to set triggerBehavior property of the button in didGrabFlicButton method. Is it correct?

AntonMeier commented 8 years ago

yes, that is correct. You can all the button configuration in the didGrabFlicButton callback since the settings will be remembered.