lib/ios/sugarcube-gestures/gestures.rb in sugarcube-2.1.5 vs lib/ios/sugarcube-gestures/gestures.rb in sugarcube-2.2.0
- old
+ new
@@ -82,10 +82,10 @@
# @overload on_swipe(taps)
# @param direction [Fixnum] Direction of swipe
# @overload on_swipe(options)
# @option options [Fixnum] :fingers Number of fingers before gesture is recognized
# @option options [Fixnum, Symbol] :direction Direction of swipe, as a UISwipeGestureRecognizerDirection constant or a symbol (`:left, :right, :up, :down`)
- def on_swipe(direction_or_options, &proc)
+ def on_swipe(direction_or_options=nil, &proc)
direction = nil
fingers = nil
if direction_or_options
if direction_or_options.is_a? Hash