Sha256: 445f5168c8d6eebd7ecdb6489615f729b0b0f27af330b7429cd24166a7b5b7d9
Contents?: true
Size: 1.51 KB
Versions: 54
Compression:
Stored size: 1.51 KB
Contents
class UIEvent def to_s type = case self.type when UIEventTypeTouches 'touch' when UIEventTypeMotion if self.subtype == UIEventSubtypeMotionShake 'shake' else 'motion' end when UIEventTypeRemoteControl case self.subtype when UIEventSubtypeRemoteControlPlay 'remote-control, Play' when UIEventSubtypeRemoteControlPause 'remote-control, Pause' when UIEventSubtypeRemoteControlStop 'remote-control, Stop' when UIEventSubtypeRemoteControlTogglePlayPause 'remote-control, TogglePlayPause' when UIEventSubtypeRemoteControlNextTrack 'remote-control, NextTrack' when UIEventSubtypeRemoteControlPreviousTrack 'remote-control, PreviousTrack' when UIEventSubtypeRemoteControlBeginSeekingBackward 'remote-control, BeginSeekingBackward' when UIEventSubtypeRemoteControlEndSeekingBackward 'remote-control, EndSeekingBackward' when UIEventSubtypeRemoteControlBeginSeekingForward 'remote-control, BeginSeekingForward' when UIEventSubtypeRemoteControlEndSeekingForward 'remote-control, EndSeekingForward' end end "#{self.class.to_s}(#{type}, touches: #{allTouches.inspect})" end end
Version data entries
54 entries across 54 versions & 1 rubygems