Class: MotionWiretap::WiretapControl
- Inherits:
-
WiretapView
- Object
- Wiretap
- WiretapTarget
- WiretapKvo
- WiretapView
- MotionWiretap::WiretapControl
- Defined in:
- lib/motion-wiretap/ios/wiretap_ios.rb
Instance Attribute Summary
Attributes inherited from WiretapKvo
Attributes inherited from WiretapTarget
Instance Method Summary collapse
- #handle_event ⇒ Object
-
#on(control_event, options = {}, &block) ⇒ Object
control_event can be any UIControlEventConstant, or any symbol found in wiretap_control_events.rb, or an array of UIControlEventConstants or symbols.
Methods inherited from WiretapView
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_event ⇒ Object
59 60 61 |
# File 'lib/motion-wiretap/ios/wiretap_ios.rb', line 59 def handle_event trigger_changed end |
#on(control_event, options = {}, &block) ⇒ Object
control_event can be any UIControlEventConstant, or any symbol found in wiretap_control_events.rb, or an array of UIControlEventConstants or symbols. Since UIView implements ‘on` to accept a gesture, this method calls `super` when the symbol isn’t a control
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/motion-wiretap/ios/wiretap_ios.rb', line 46 def on(control_event, ={}, &block) begin control_event = ControlEvents.convert(control_event) self.target.addTarget(self, action: :handle_event, forControlEvents: control_event) rescue ControlEventNotFound super(control_event, , &block) else super(nil, , &block) end return self end |