RubyMotionSamples 確認

以下なリポジトリのソレを順に確認の方向。

とりあえず HelloWorld 方面から。

エントリポイント

AppDelegate なクラスが基点、ということにて。

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
    @window.rootViewController = HelloViewController.alloc.init
    @window.rootViewController.wantsFullScreenLayout = true
    @window.makeKeyAndVisible
    true
  end
end

HelloViewController を云々なさってらっしゃいます。見てみるに以下。

class HelloViewController < UIViewController
  def loadView
    self.view = HelloView.alloc.init
  end
end

HelloView を云々。定義されてるメソドが以下。

  • drawRect
  • touchesMoved
  • touchesEnded

これ、touch してそのまんま動かすと、なのかな。とりあえず今日は別なドキュメントを確認しつつクタバる方向です。