Class: UIViewController
Class Method Summary collapse
Instance Method Summary collapse
- #append(view_or_constant, style = nil, opts = {}) ⇒ Object
- #append!(view_or_constant, style = nil, opts = {}) ⇒ Object
- #build(view_or_constant, style = nil, opts = {}) ⇒ Object
- #build!(view_or_constant, style = nil, opts = {}) ⇒ Object
- #color ⇒ Object
- #create(view_or_constant, style = nil, opts = {}) ⇒ Object
- #create!(view_or_constant, style = nil, opts = {}) ⇒ Object
- #didRotateFromInterfaceOrientation(orientation) ⇒ Object
- #font ⇒ Object
- #image ⇒ Object
- #on_load ⇒ Object
- #on_rotate(orientation) ⇒ Object
-
#originalViewDidLoad ⇒ Object
Monkey patch because I think that overriding viewDidLoad like this may be problematic.
- #prepend(view_or_constant, style = nil, opts = {}) ⇒ Object
- #prepend!(view_or_constant, style = nil, opts = {}) ⇒ Object
- #reapply_styles ⇒ Object
- #should_autorotate ⇒ Object
- #should_rotate(orientation) ⇒ Object
- #shouldAutorotate ⇒ Object
- #shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
- #stylesheet ⇒ Object
- #stylesheet=(value) ⇒ Object
- #view_did_appear(animated) ⇒ Object
- #view_did_disappear(animated) ⇒ Object
- #view_did_load ⇒ Object
- #view_will_appear(animated) ⇒ Object
- #view_will_disappear(animated) ⇒ Object
- #viewDidAppear(animated) ⇒ Object
- #viewDidDisappear(animated) ⇒ Object
- #viewDidLoad ⇒ Object
- #viewWillAppear(animated) ⇒ Object
- #viewWillDisappear(animated) ⇒ Object
- #will_animate_rotate(orientation, duration) ⇒ Object
- #will_rotate(orientation, duration) ⇒ Object
- #willAnimateRotationToInterfaceOrientation(orientation, duration: duration) ⇒ Object
- #willRotateToInterfaceOrientation(orientation, duration: duration) ⇒ Object
Class Method Details
.rmq_style_sheet_class ⇒ Object
58 59 60 |
# File 'lib/project/ext/ui_view_controller.rb', line 58 def self.rmq_style_sheet_class @rmq_style_sheet_class end |
.stylesheet(style_sheet_class) ⇒ Object
54 55 56 |
# File 'lib/project/ext/ui_view_controller.rb', line 54 def self.stylesheet(style_sheet_class) @rmq_style_sheet_class = style_sheet_class end |
Instance Method Details
#append(view_or_constant, style = nil, opts = {}) ⇒ Object
2 3 4 |
# File 'lib/project/ext/ui_view_controller.rb', line 2 def append(view_or_constant, style=nil, opts = {}) view.append(view_or_constant, style, opts) end |
#append!(view_or_constant, style = nil, opts = {}) ⇒ Object
5 6 7 |
# File 'lib/project/ext/ui_view_controller.rb', line 5 def append!(view_or_constant, style=nil, opts = {}) view.append!(view_or_constant, style, opts) end |
#build(view_or_constant, style = nil, opts = {}) ⇒ Object
23 24 25 |
# File 'lib/project/ext/ui_view_controller.rb', line 23 def build(view_or_constant, style = nil, opts = {}) view.build(view_or_constant, style, opts) end |
#build!(view_or_constant, style = nil, opts = {}) ⇒ Object
26 27 28 |
# File 'lib/project/ext/ui_view_controller.rb', line 26 def build!(view_or_constant, style = nil, opts = {}) view.build!(view_or_constant, style, opts) end |
#color ⇒ Object
34 35 36 |
# File 'lib/project/ext/ui_view_controller.rb', line 34 def color rmq.color end |
#create(view_or_constant, style = nil, opts = {}) ⇒ Object
16 17 18 |
# File 'lib/project/ext/ui_view_controller.rb', line 16 def create(view_or_constant, style=nil, opts = {}) view.create(view_or_constant, style, opts) end |
#create!(view_or_constant, style = nil, opts = {}) ⇒ Object
19 20 21 |
# File 'lib/project/ext/ui_view_controller.rb', line 19 def create!(view_or_constant, style=nil, opts = {}) view.create!(view_or_constant, style, opts) end |
#didRotateFromInterfaceOrientation(orientation) ⇒ Object
146 147 148 |
# File 'lib/project/ext/ui_view_controller.rb', line 146 def didRotateFromInterfaceOrientation(orientation) self.on_rotate orientation end |
#font ⇒ Object
38 39 40 |
# File 'lib/project/ext/ui_view_controller.rb', line 38 def font rmq.font end |
#image ⇒ Object
42 43 44 |
# File 'lib/project/ext/ui_view_controller.rb', line 42 def image rmq.image end |
#on_load ⇒ Object
62 63 |
# File 'lib/project/ext/ui_view_controller.rb', line 62 def on_load end |
#on_rotate(orientation) ⇒ Object
143 144 |
# File 'lib/project/ext/ui_view_controller.rb', line 143 def on_rotate(orientation) end |
#originalViewDidLoad ⇒ Object
Monkey patch because I think that overriding viewDidLoad like this may be problematic
69 |
# File 'lib/project/ext/ui_view_controller.rb', line 69 alias :originalViewDidLoad :viewDidLoad |
#prepend(view_or_constant, style = nil, opts = {}) ⇒ Object
9 10 11 |
# File 'lib/project/ext/ui_view_controller.rb', line 9 def prepend(view_or_constant, style=nil, opts = {}) view.prepend(view_or_constant, style, opts) end |
#prepend!(view_or_constant, style = nil, opts = {}) ⇒ Object
12 13 14 |
# File 'lib/project/ext/ui_view_controller.rb', line 12 def prepend!(view_or_constant, style=nil, opts = {}) view.prepend!(view_or_constant, style, opts) end |
#reapply_styles ⇒ Object
30 31 32 |
# File 'lib/project/ext/ui_view_controller.rb', line 30 def reapply_styles rmq.all.reapply_styles end |
#should_autorotate ⇒ Object
128 129 130 |
# File 'lib/project/ext/ui_view_controller.rb', line 128 def should_autorotate true end |
#should_rotate(orientation) ⇒ Object
121 122 |
# File 'lib/project/ext/ui_view_controller.rb', line 121 def should_rotate(orientation) end |
#shouldAutorotate ⇒ Object
132 133 134 |
# File 'lib/project/ext/ui_view_controller.rb', line 132 def shouldAutorotate self.should_autorotate end |
#shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
124 125 126 |
# File 'lib/project/ext/ui_view_controller.rb', line 124 def shouldAutorotateToInterfaceOrientation(orientation) self.should_rotate(orientation) end |
#stylesheet ⇒ Object
46 47 48 |
# File 'lib/project/ext/ui_view_controller.rb', line 46 def stylesheet rmq.stylesheet end |
#stylesheet=(value) ⇒ Object
50 51 52 |
# File 'lib/project/ext/ui_view_controller.rb', line 50 def stylesheet=(value) rmq.stylesheet = value end |
#view_did_appear(animated) ⇒ Object
94 95 |
# File 'lib/project/ext/ui_view_controller.rb', line 94 def view_did_appear(animated) end |
#view_did_disappear(animated) ⇒ Object
112 113 |
# File 'lib/project/ext/ui_view_controller.rb', line 112 def view_did_disappear(animated) end |
#view_did_load ⇒ Object
65 66 |
# File 'lib/project/ext/ui_view_controller.rb', line 65 def view_did_load end |
#view_will_appear(animated) ⇒ Object
85 86 |
# File 'lib/project/ext/ui_view_controller.rb', line 85 def view_will_appear(animated) end |
#view_will_disappear(animated) ⇒ Object
103 104 |
# File 'lib/project/ext/ui_view_controller.rb', line 103 def view_will_disappear(animated) end |
#viewDidAppear(animated) ⇒ Object
97 98 99 100 101 |
# File 'lib/project/ext/ui_view_controller.rb', line 97 def viewDidAppear(animated) unless pm_handles_delegates? self.view_did_appear(animated) end end |
#viewDidDisappear(animated) ⇒ Object
115 116 117 118 119 |
# File 'lib/project/ext/ui_view_controller.rb', line 115 def viewDidDisappear(animated) unless pm_handles_delegates? self.view_did_disappear(animated) end end |
#viewDidLoad ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/project/ext/ui_view_controller.rb', line 70 def viewDidLoad if self.class.rmq_style_sheet_class self.rmq.stylesheet = self.class.rmq_style_sheet_class self.view.rmq.apply_style(:root_view) if self.rmq.stylesheet.respond_to?(:root_view) end self.originalViewDidLoad unless pm_handles_delegates? unless self.class.included_modules.include?(ProMotion::ScreenModule) self.view_did_load end self.on_load end end |
#viewWillAppear(animated) ⇒ Object
88 89 90 91 92 |
# File 'lib/project/ext/ui_view_controller.rb', line 88 def viewWillAppear(animated) unless pm_handles_delegates? self.view_will_appear(animated) end end |
#viewWillDisappear(animated) ⇒ Object
106 107 108 109 110 |
# File 'lib/project/ext/ui_view_controller.rb', line 106 def viewWillDisappear(animated) unless pm_handles_delegates? self.view_will_disappear(animated) end end |
#will_animate_rotate(orientation, duration) ⇒ Object
150 151 |
# File 'lib/project/ext/ui_view_controller.rb', line 150 def will_animate_rotate(orientation, duration) end |
#will_rotate(orientation, duration) ⇒ Object
136 137 |
# File 'lib/project/ext/ui_view_controller.rb', line 136 def will_rotate(orientation, duration) end |
#willAnimateRotationToInterfaceOrientation(orientation, duration: duration) ⇒ Object
153 154 155 |
# File 'lib/project/ext/ui_view_controller.rb', line 153 def willAnimateRotationToInterfaceOrientation(orientation, duration: duration) self.will_animate_rotate(orientation, duration) end |
#willRotateToInterfaceOrientation(orientation, duration: duration) ⇒ Object
139 140 141 |
# File 'lib/project/ext/ui_view_controller.rb', line 139 def willRotateToInterfaceOrientation(orientation, duration:duration) self.will_rotate(orientation, duration) end |