Class: AppDelegate

Inherits:
Object
  • Object
show all
Defined in:
app/app_delegate.rb

Instance Method Summary collapse

Instance Method Details

#application(application, didFinishLaunchingWithOptions: launchOptions) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/app_delegate.rb', line 3

def application(application, didFinishLaunchingWithOptions:launchOptions)
  return true if RUBYMOTION_ENV == 'test'

  @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)

  ctlr = UIViewController.new
  ctlr.view.frame = @window.bounds

  gradient = GradientView.new
  gradient.frame = ctlr.view.bounds
  gradient.startColor = UIColor.whiteColor
  gradient.finalColor = UIColor.blackColor

  ctlr.view.addSubview(gradient)

  @window.rootViewController = ctlr
  @window.makeKeyAndVisible

  true
end