Module: BubbleWrap::UIViewWrapper

Defined in:
motion/ui/ui_view_wrapper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.deprecated_methodsObject


31
32
33
# File 'motion/ui/ui_view_wrapper.rb', line 31

def self.deprecated_methods
  %w(whenTapped whenPinched whenRotated whenSwiped whenPanned whenPressed)
end

Instance Method Details

#when_panned(enableInteraction = true, &proc) ⇒ Object


19
20
21
# File 'motion/ui/ui_view_wrapper.rb', line 19

def when_panned(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UIPanGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end

#when_pinched(enableInteraction = true, &proc) ⇒ Object


7
8
9
# File 'motion/ui/ui_view_wrapper.rb', line 7

def when_pinched(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UIPinchGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end

#when_pressed(enableInteraction = true, &proc) ⇒ Object


27
28
29
# File 'motion/ui/ui_view_wrapper.rb', line 27

def when_pressed(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UILongPressGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end

#when_rotated(enableInteraction = true, &proc) ⇒ Object


11
12
13
# File 'motion/ui/ui_view_wrapper.rb', line 11

def when_rotated(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UIRotationGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end

#when_screen_edge_panned(enableInteraction = true, &proc) ⇒ Object


23
24
25
# File 'motion/ui/ui_view_wrapper.rb', line 23

def when_screen_edge_panned(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UIScreenEdgePanGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end

#when_swiped(enableInteraction = true, &proc) ⇒ Object


15
16
17
# File 'motion/ui/ui_view_wrapper.rb', line 15

def when_swiped(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UISwipeGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end

#when_tapped(enableInteraction = true, &proc) ⇒ Object


3
4
5
# File 'motion/ui/ui_view_wrapper.rb', line 3

def when_tapped(enableInteraction=true, &proc)
  add_gesture_recognizer_helper(UITapGestureRecognizer.alloc.initWithTarget(self, action:'handle_gesture:'), enableInteraction, proc)
end