Sha256: f8870b4c91655dfeedb9a21de86224fe3d04179b781a2a99e0602cfd8491cc96

Contents?: true

Size: 602 Bytes

Versions: 43

Compression:

Stored size: 602 Bytes

Contents

include SugarCube::Adjust
include SugarCube::CoreGraphics


class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    return true if RUBYMOTION_ENV == 'test'

    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
    ctlr = MyController.new
    @window.rootViewController = ctlr
    @window.makeKeyAndVisible
  end
end


class MyController < UIViewController

  def loadView
    super.tap do
      @label = 'Hi!'.uilabel
      @label.center = self.view.center
      @label.textColor = :white.uicolor
      self.view << @label
    end
  end

end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
sugarcube-0.20.12 app/app_delegate.rb
sugarcube-0.20.11 app/app_delegate.rb
sugarcube-0.20.10 app/app_delegate.rb
sugarcube-0.20.9 app/app_delegate.rb
sugarcube-0.20.8 app/app_delegate.rb
sugarcube-0.20.7 app/app_delegate.rb
sugarcube-0.20.6 app/app_delegate.rb
sugarcube-0.20.5 app/app_delegate.rb
sugarcube-0.20.4 app/app_delegate.rb
sugarcube-0.20.3 app/app_delegate.rb
sugarcube-0.20.1 app/app_delegate.rb
sugarcube-0.20.0 app/app_delegate.rb
sugarcube-0.19.5 app/app_delegate.rb
sugarcube-0.19.4 app/app_delegate.rb
sugarcube-0.19.2 app/app_delegate.rb
sugarcube-0.19.0 app/app_delegate.rb
sugarcube-0.18.21 app/app_delegate.rb
sugarcube-0.18.20 app/app_delegate.rb
sugarcube-0.18.19 app/app_delegate.rb
sugarcube-0.18.18 app/app_delegate.rb