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
55 56 57 |
# File 'lib/project/ext/ui_view_controller.rb', line 55 def self.rmq_style_sheet_class @rmq_style_sheet_class end |
.stylesheet(style_sheet_class) ⇒ Object
52 53 54 |
# File 'lib/project/ext/ui_view_controller.rb', line 52 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
135 136 137 |
# File 'lib/project/ext/ui_view_controller.rb', line 135 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
59 60 |
# File 'lib/project/ext/ui_view_controller.rb', line 59 def on_load end |
#on_rotate(orientation) ⇒ Object
133 134 |
# File 'lib/project/ext/ui_view_controller.rb', line 133 def on_rotate(orientation) end |
#originalViewDidLoad ⇒ Object
Monkey patch because I think that overriding viewDidLoad like this may be problematic
66 |
# File 'lib/project/ext/ui_view_controller.rb', line 66 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
120 121 122 |
# File 'lib/project/ext/ui_view_controller.rb', line 120 def should_autorotate true end |
#should_rotate(orientation) ⇒ Object
114 115 |
# File 'lib/project/ext/ui_view_controller.rb', line 114 def should_rotate(orientation) end |
#shouldAutorotate ⇒ Object
123 124 125 |
# File 'lib/project/ext/ui_view_controller.rb', line 123 def shouldAutorotate self.should_autorotate end |
#shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
116 117 118 |
# File 'lib/project/ext/ui_view_controller.rb', line 116 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
49 50 51 |
# File 'lib/project/ext/ui_view_controller.rb', line 49 def stylesheet=(value) rmq.stylesheet = value end |
#view_did_appear(animated) ⇒ Object
90 91 |
# File 'lib/project/ext/ui_view_controller.rb', line 90 def view_did_appear(animated) end |
#view_did_disappear(animated) ⇒ Object
106 107 |
# File 'lib/project/ext/ui_view_controller.rb', line 106 def view_did_disappear(animated) end |
#view_did_load ⇒ Object
62 63 |
# File 'lib/project/ext/ui_view_controller.rb', line 62 def view_did_load end |
#view_will_appear(animated) ⇒ Object
82 83 |
# File 'lib/project/ext/ui_view_controller.rb', line 82 def view_will_appear(animated) end |
#view_will_disappear(animated) ⇒ Object
98 99 |
# File 'lib/project/ext/ui_view_controller.rb', line 98 def view_will_disappear(animated) end |
#viewDidAppear(animated) ⇒ Object
92 93 94 95 96 |
# File 'lib/project/ext/ui_view_controller.rb', line 92 def viewDidAppear(animated) unless pm_handles_delegates? self.view_did_appear(animated) end end |
#viewDidDisappear(animated) ⇒ Object
108 109 110 111 112 |
# File 'lib/project/ext/ui_view_controller.rb', line 108 def viewDidDisappear(animated) unless pm_handles_delegates? self.view_did_disappear(animated) end end |
#viewDidLoad ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/project/ext/ui_view_controller.rb', line 67 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 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
84 85 86 87 88 |
# File 'lib/project/ext/ui_view_controller.rb', line 84 def viewWillAppear(animated) unless pm_handles_delegates? self.view_will_appear(animated) end end |
#viewWillDisappear(animated) ⇒ Object
100 101 102 103 104 |
# File 'lib/project/ext/ui_view_controller.rb', line 100 def viewWillDisappear(animated) unless pm_handles_delegates? self.view_will_disappear(animated) end end |
#will_animate_rotate(orientation, duration) ⇒ Object
139 140 |
# File 'lib/project/ext/ui_view_controller.rb', line 139 def will_animate_rotate(orientation, duration) end |
#will_rotate(orientation, duration) ⇒ Object
127 128 |
# File 'lib/project/ext/ui_view_controller.rb', line 127 def will_rotate(orientation, duration) end |
#willAnimateRotationToInterfaceOrientation(orientation, duration: duration) ⇒ Object
141 142 143 |
# File 'lib/project/ext/ui_view_controller.rb', line 141 def willAnimateRotationToInterfaceOrientation(orientation, duration: duration) self.will_animate_rotate(orientation, duration) end |
#willRotateToInterfaceOrientation(orientation, duration: duration) ⇒ Object
129 130 131 |
# File 'lib/project/ext/ui_view_controller.rb', line 129 def willRotateToInterfaceOrientation(orientation, duration:duration) self.will_rotate(orientation, duration) end |