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

Version Path
sugarcube-3.0.4 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-3.0.3 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-3.0.2 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-3.0.1 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-3.0.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.12.3 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.12.2 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.12.1 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.12.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.11.1 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.11.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.10.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.9.1 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.8.2 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.8.1 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.8.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.7.1 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.7.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.6.0 lib/ios/sugarcube-to_s/uievent.rb
sugarcube-2.5.0 lib/ios/sugarcube-to_s/uievent.rb