Class: MotionWiretap::WiretapView
- Inherits:
-
WiretapKvo
- Object
- Wiretap
- WiretapTarget
- WiretapKvo
- MotionWiretap::WiretapView
- Defined in:
- lib/motion-wiretap/ios/wiretap_ios.rb,
lib/motion-wiretap/osx/wiretap_osx.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from WiretapKvo
Attributes inherited from WiretapTarget
Instance Method Summary collapse
Methods inherited from WiretapKvo
#bind_to, #initialize, #observeValueForKeyPath, #teardown, #trigger_changed
Methods inherited from WiretapTarget
Methods inherited from Wiretap
#and_then, #cancel!, #combine, #dealloc, #enqueue, #filter, #initialize, #listen, #map, #on_error, #queue, #reduce, #teardown, #trigger_changed, #trigger_changed_on, #trigger_completed, #trigger_completed_on, #trigger_error, #trigger_error_on
Constructor Details
This class inherits a constructor from MotionWiretap::WiretapKvo
Instance Method Details
#handle_gesture ⇒ Object
34 35 36 |
# File 'lib/motion-wiretap/ios/wiretap_ios.rb', line 34 def handle_gesture trigger_changed end |
#on(recognizer, options = nil, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/motion-wiretap/ios/wiretap_ios.rb', line 7 def on(recognizer, =nil, &block) if recognizer case recognizer when :tap recognizer = Gestures.tap(self, ) when :pinch recognizer = Gestures.pinch(self, ) when :rotate recognizer = Gestures.rotate(self, ) when :swipe recognizer = Gestures.swipe(self, ) when :pan recognizer = Gestures.pan(self, ) when :press recognizer = Gestures.press(self, ) else raise GestureNotFound.new(recognizer.to_s) end self.target.addGestureRecognizer(recognizer) end listen(&block) return self end |