SwiftyDrop icon indicating copy to clipboard operation
SwiftyDrop copied to clipboard

Completion handler

Open andreyrd opened this issue 7 years ago • 2 comments

Added a completion handler to the dropdown, as discussed in #55

I kept action as the last parameter to drop(), so that we don't break anyone using trailing closure syntax. Based on a compile of my own project that uses SwiftyDrop, this doesn't seem to be a breaking change, but I'm not sure how adding this optional parameter will affect other projects.

andreyrd avatar Nov 20 '17 18:11 andreyrd

Thanks! I think it's a good approach. But I have a same concern about existing action. It'll maybe good for adding deprecated for exiting action .. mm.

morizotter avatar Nov 21 '17 01:11 morizotter

Ah, right now action handles tap, while completion handles swipe or timeout. Maybe for a v5, completion could handle tap, swipe, and timeout!

andreyrd avatar Nov 21 '17 03:11 andreyrd