mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-17 23:15:02 +08:00
14 lines
269 B
Ruby
14 lines
269 B
Ruby
class PaintViewController < UIViewController
|
|
def loadView
|
|
self.view = PaintView.alloc.init
|
|
end
|
|
|
|
def canBecomeFirstResponder
|
|
true
|
|
end
|
|
|
|
def motionEnded(motion, withEvent:event)
|
|
self.view.eraseContent if motion == UIEventSubtypeMotionShake
|
|
end
|
|
end
|