Sha256: 385449094ff998f1ad46b0329c234d2c6b80dcd845fc8bd387b701a04f931c29

Contents?: true

Size: 576 Bytes

Versions: 35

Compression:

Stored size: 576 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

35 entries across 35 versions & 1 rubygems

Version Path
sugarcube-1.4.1 app/app_delegate.rb
sugarcube-1.4.0 app/app_delegate.rb
sugarcube-1.3.11 app/app_delegate.rb
sugarcube-1.3.10 app/app_delegate.rb
sugarcube-1.3.9 app/app_delegate.rb
sugarcube-1.3.8 app/app_delegate.rb
sugarcube-1.3.7 app/app_delegate.rb
sugarcube-1.3.6 app/app_delegate.rb
sugarcube-1.3.5 app/app_delegate.rb
sugarcube-1.3.4 app/app_delegate.rb
sugarcube-1.3.3 app/app_delegate.rb
sugarcube-1.3.2 app/app_delegate.rb
sugarcube-1.3.1 app/app_delegate.rb
sugarcube-1.3.0 app/app_delegate.rb
sugarcube-1.1.0 app/app_delegate.rb