Sha256: 1fea05f4e340801a5dcbcaf8619e831fc91eb58971098f321c1ab846776c4d98

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

class UnderOs::App

  class << self

    def start(&block)
      @start_block = block
    end

    def setup(ios_app, options)
      instance_exec self, &@start_block

      @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
      @window.rootViewController = root_controller
      @window.makeKeyAndVisible
    end

    def config
      @config ||= UnderOs::Config.new(self)
    end

  protected

    def root_controller
      # just a fallback, supposed to be replaced with the real thing in a submodule
      UIViewController.alloc.initWithNibName(nil, bundle: nil)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
under-os-core-1.4.0 lib/under_os/app.rb