Class: UIView

Inherits:
Object
  • Object
show all
Defined in:
motion/ui/gestures.rb

Overview

Opens UIView to add methods for working with gesture recognizers.

Instance Method Summary collapse

Instance Method Details

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


21
22
23
# File 'motion/ui/gestures.rb', line 21

def whenPanned(enableInteraction=true, &proc)
  addGestureRecognizerHelper(proc, enableInteraction, UIPanGestureRecognizer.alloc.initWithTarget(self, action:'motionHandleGesture:'))
end

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


9
10
11
# File 'motion/ui/gestures.rb', line 9

def whenPinched(enableInteraction=true, &proc)
  addGestureRecognizerHelper(proc, enableInteraction, UIPinchGestureRecognizer.alloc.initWithTarget(self, action:'motionHandleGesture:'))
end

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


25
26
27
# File 'motion/ui/gestures.rb', line 25

def whenPressed(enableInteraction=true, &proc)
  addGestureRecognizerHelper(proc, enableInteraction, UILongPressGestureRecognizer.alloc.initWithTarget(self, action:'motionHandleGesture:'))
end

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


13
14
15
# File 'motion/ui/gestures.rb', line 13

def whenRotated(enableInteraction=true, &proc)
  addGestureRecognizerHelper(proc, enableInteraction, UIRotationGestureRecognizer.alloc.initWithTarget(self, action:'motionHandleGesture:'))
end

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


17
18
19
# File 'motion/ui/gestures.rb', line 17

def whenSwiped(enableInteraction=true, &proc)
  addGestureRecognizerHelper(proc, enableInteraction, UISwipeGestureRecognizer.alloc.initWithTarget(self, action:'motionHandleGesture:'))
end

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


5
6
7
# File 'motion/ui/gestures.rb', line 5

def whenTapped(enableInteraction=true, &proc)
  addGestureRecognizerHelper(proc, enableInteraction, UITapGestureRecognizer.alloc.initWithTarget(self, action:'motionHandleGesture:'))
end