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.7.0 app/app_delegate.rb
sugarcube-1.6.3 app/app_delegate.rb
sugarcube-1.6.2 app/app_delegate.rb
sugarcube-1.6.1 app/app_delegate.rb
sugarcube-1.6.0 app/app_delegate.rb
sugarcube-1.5.9 app/app_delegate.rb
sugarcube-1.5.8 app/app_delegate.rb
sugarcube-1.5.7 app/app_delegate.rb
sugarcube-1.5.6 app/app_delegate.rb
sugarcube-1.5.5 app/app_delegate.rb
sugarcube-1.5.4 app/app_delegate.rb
sugarcube-1.5.3 app/app_delegate.rb
sugarcube-1.5.2 app/app_delegate.rb
sugarcube-1.5.1 app/app_delegate.rb
sugarcube-1.5.0 app/app_delegate.rb
sugarcube-1.4.6 app/app_delegate.rb
sugarcube-1.4.5 app/app_delegate.rb
sugarcube-1.4.4 app/app_delegate.rb
sugarcube-1.4.3 app/app_delegate.rb
sugarcube-1.4.2 app/app_delegate.rb