Sha256: ed7211cb0a1d761cd746589b6bb9733bc042e9e570022af553ac1f164b071046

Contents?: true

Size: 575 Bytes

Versions: 13

Compression:

Stored size: 575 Bytes

Contents

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

13 entries across 13 versions & 1 rubygems

Version Path
sugarcube-0.18.11 app/app_delegate.rb
sugarcube-0.18.10 app/app_delegate.rb
sugarcube-0.18.9 app/app_delegate.rb
sugarcube-0.18.8 app/app_delegate.rb
sugarcube-0.18.7 app/app_delegate.rb
sugarcube-0.18.6 app/app_delegate.rb
sugarcube-0.18.5 app/app_delegate.rb
sugarcube-0.18.4 app/app_delegate.rb
sugarcube-0.18.3 app/app_delegate.rb
sugarcube-0.18.2 app/app_delegate.rb
sugarcube-0.18.1 app/app_delegate.rb
sugarcube-0.18.0 app/app_delegate.rb
sugarcube-0.16.9 app/app_delegate.rb