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-1.0.7 app/app_delegate.rb
sugarcube-1.0.6 app/app_delegate.rb
sugarcube-1.0.5 app/app_delegate.rb
sugarcube-1.0.4 app/app_delegate.rb
sugarcube-1.0.3 app/app_delegate.rb
sugarcube-1.0.2 app/app_delegate.rb
sugarcube-1.0.1 app/app_delegate.rb
sugarcube-1.0.0 app/app_delegate.rb
sugarcube-0.20.25 app/app_delegate.rb
sugarcube-0.20.24 app/app_delegate.rb
sugarcube-0.20.23 app/app_delegate.rb
sugarcube-0.20.22 app/app_delegate.rb
sugarcube-0.20.21 app/app_delegate.rb
sugarcube-0.20.20 app/app_delegate.rb
sugarcube-0.20.19 app/app_delegate.rb
sugarcube-0.20.18 app/app_delegate.rb
sugarcube-0.20.17 app/app_delegate.rb
sugarcube-0.20.16 app/app_delegate.rb
sugarcube-0.20.15 app/app_delegate.rb
sugarcube-0.20.13 app/app_delegate.rb