Module: ProMotion::DelegateModule
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
Attributes included from Tabs
#tab_bar, #tab_bar_item
Class Method Summary
collapse
Instance Method Summary
collapse
#create_split_screen, #open_split_screen, #splitViewController
Methods included from Tabs
#create_tab_bar_item, #create_tab_bar_item_custom, #map_tab_symbol, #open_tab, #open_tab_bar, #refresh_tab_bar_item, #replace_current_item, #set_tab_bar_badge, #set_tab_bar_item
Instance Attribute Details
#home_screen ⇒ Object
Returns the value of attribute home_screen.
6
7
8
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 6
def home_screen
@home_screen
end
|
#window ⇒ Object
Returns the value of attribute window.
6
7
8
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 6
def window
@window
end
|
Class Method Details
.included(base) ⇒ Object
123
124
125
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 123
def self.included(base)
base.extend(ClassMethods)
end
|
Instance Method Details
#app_delegate ⇒ Object
45
46
47
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 45
def app_delegate
self
end
|
#app_window ⇒ Object
49
50
51
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 49
def app_window
window
end
|
#application(application, openURL: url, sourceApplication: source_app, annotation: annotation) ⇒ Object
8
9
10
11
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 8
def application(application, willFinishLaunchingWithOptions:launch_options)
will_load(application, launch_options) if respond_to?(:will_load)
true
end
|
#applicationDidBecomeActive(application) ⇒ Object
21
22
23
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 21
def applicationDidBecomeActive(application)
try :on_activate
end
|
#applicationDidEnterBackground(application) ⇒ Object
29
30
31
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 29
def applicationDidEnterBackground(application)
try :on_enter_background
end
|
#applicationWillEnterForeground(application) ⇒ Object
33
34
35
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 33
def applicationWillEnterForeground(application)
try :will_enter_foreground
end
|
#applicationWillResignActive(application) ⇒ Object
25
26
27
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 25
def applicationWillResignActive(application)
try :will_deactivate
end
|
#applicationWillTerminate(application) ⇒ Object
37
38
39
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 37
def applicationWillTerminate(application)
try :on_unload
end
|
#open(screen, args = {}) ⇒ Object
Also known as:
open_screen
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 57
def open(screen, args={})
screen = screen.new if screen.respond_to?(:new)
self.home_screen = screen
self.window ||= self.ui_window.alloc.initWithFrame(UIScreen.mainScreen.bounds)
self.window.rootViewController = (screen.navigationController || screen)
self.window.tintColor = self.class.send(:get_tint_color) if self.window.respond_to?("tintColor=")
self.window.makeKeyAndVisible
screen
end
|
#status_bar? ⇒ Boolean
72
73
74
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 72
def status_bar?
UIApplication.sharedApplication.statusBarHidden
end
|
#ui_window ⇒ Object
53
54
55
|
# File 'lib/ProMotion/delegate/delegate_module.rb', line 53
def ui_window
(defined?(Motion) && defined?(Motion::Xray) && defined?(Motion::Xray::XrayWindow)) ? Motion::Xray::XrayWindow : UIWindow
end
|