Class: AppDelegate

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#samplesObject (readonly)

Returns the value of attribute samples.



4
5
6
# File 'app/app_delegate.rb', line 4

def samples
  @samples
end

Instance Method Details

#alert(message) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'app/app_delegate.rb', line 25

def alert( message )
  WCAlertView.showAlertWithTitle( "Motion-Awesome", message:message,
    customizationBlock: ->(alertView) do
      ;
    end,
    completionBlock: ->(buttonIndex, view) do
      ;
    end,
    cancelButtonTitle:"Roger that!", otherButtonTitles:nil )
end

#application(application, didFinishLaunchingWithOptions: launchOptions) ⇒ Object



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

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

  @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
  nav = UINavigationController.alloc.initWithRootViewController( A.new )
  @window.rootViewController = nav
  @window.rootViewController.wantsFullScreenLayout = true

  @window.makeKeyAndVisible

  nav.setNavigationBarHidden( true, animated:true )

  setup_appearance

  @samples = %w(A B C D E)

  true
end