Module: Lotion::Application
Instance Method Summary
collapse
#notification_center, #notify
Instance Method Details
#application(application, didFinishLaunchingWithOptions: launchOptions) ⇒ Object
35
36
37
|
# File 'lib/lotion/application.rb', line 35
def application( application, didFinishLaunchingWithOptions:launchOptions )
notify 'application:startup', launchOptions
end
|
#on(name, command) ⇒ Object
22
23
24
25
|
# File 'lib/lotion/application.rb', line 22
def on( name, command )
notification_center.addObserver command,
selector:'call:', name:name, object:nil
end
|
#screen ⇒ Object
10
11
12
|
# File 'lib/lotion/application.rb', line 10
def screen
UIScreen.mainScreen
end
|
#views ⇒ Object
29
30
31
|
# File 'lib/lotion/application.rb', line 29
def views
@views ||= Hash.new { |h, k| h[ k ] = k.alloc.init }
end
|
#window ⇒ Object
16
17
18
|
# File 'lib/lotion/application.rb', line 16
def window
@window ||= UIWindow.alloc.initWithFrame screen.bounds
end
|