Class: UITouch
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ios/sugarcube-to_s/uitouch.rb', line 3 def to_s phase = case self.phase when UITouchPhaseBegan 'began' when UITouchPhaseMoved 'moved' when UITouchPhaseStationary 'stationary' when UITouchPhaseEnded 'ended' when UITouchPhaseCancelled 'cancelled' end "#{self.class.to_s}(#{self.tapCount} #{self.tapCount == 1 ? 'tap' : 'taps'}, phase: #{phase}, "\ "at #{self.locationInView(self.view).inspect}, @ #{self.})" end |