Class: UnderOs::Page::UIViewControllerWrap
- Defined in:
- lib/under_os/page.rb
Overview
A simple wrap over UIViewController to intercept the iOS events
Instance Attribute Summary collapse
-
#wrapper ⇒ Object
readonly
Returns the value of attribute wrapper.
Instance Method Summary collapse
- #didRotateFromInterfaceOrientation(orientation) ⇒ Object
- #init(wrapper, options) ⇒ Object
- #loadView ⇒ Object
- #prefersStatusBarHidden ⇒ Object
- #touchesBegan(touches, withEvent: event) ⇒ Object
- #touchesCancelled(touches, withEvent: event) ⇒ Object
- #touchesEnded(touches, withEvent: event) ⇒ Object
- #touchesMoved(touches, withEvent: event) ⇒ Object
- #viewDidAppear(animated) ⇒ Object
- #viewDidDisappear(animated) ⇒ Object
- #viewDidLoad ⇒ Object
- #viewWillLayoutSubviews ⇒ Object
Instance Attribute Details
#wrapper ⇒ Object (readonly)
Returns the value of attribute wrapper.
111 112 113 |
# File 'lib/under_os/page.rb', line 111 def wrapper @wrapper end |
Instance Method Details
#didRotateFromInterfaceOrientation(orientation) ⇒ Object
144 145 146 147 |
# File 'lib/under_os/page.rb', line 144 def didRotateFromInterfaceOrientation(orientation) super @options[:on_view_rotate].call end |
#init(wrapper, options) ⇒ Object
113 114 115 116 117 |
# File 'lib/under_os/page.rb', line 113 def init(wrapper, ) @wrapper = wrapper @options = initWithNibName(nil, bundle: nil) end |
#loadView ⇒ Object
119 120 121 122 |
# File 'lib/under_os/page.rb', line 119 def loadView super @options[:on_load_view].call end |
#prefersStatusBarHidden ⇒ Object
149 150 151 |
# File 'lib/under_os/page.rb', line 149 def prefersStatusBarHidden !UnderOs::App.config. end |
#touchesBegan(touches, withEvent: event) ⇒ Object
153 154 155 |
# File 'lib/under_os/page.rb', line 153 def touchesBegan(touches, withEvent:event) UnderOs::UI::Events::TouchListeners.notify :touchstart, event end |
#touchesCancelled(touches, withEvent: event) ⇒ Object
165 166 167 |
# File 'lib/under_os/page.rb', line 165 def touchesCancelled(touches, withEvent: event) UnderOs::UI::Events::TouchListeners.notify :touchcancel, event end |
#touchesEnded(touches, withEvent: event) ⇒ Object
161 162 163 |
# File 'lib/under_os/page.rb', line 161 def touchesEnded(touches, withEvent: event) UnderOs::UI::Events::TouchListeners.notify :touchend, event end |
#touchesMoved(touches, withEvent: event) ⇒ Object
157 158 159 |
# File 'lib/under_os/page.rb', line 157 def touchesMoved(touches, withEvent:event) UnderOs::UI::Events::TouchListeners.notify :touchmove, event end |
#viewDidAppear(animated) ⇒ Object
129 130 131 132 |
# File 'lib/under_os/page.rb', line 129 def viewDidAppear(animated) super @options[:on_view_appear].call end |
#viewDidDisappear(animated) ⇒ Object
134 135 136 137 |
# File 'lib/under_os/page.rb', line 134 def viewDidDisappear(animated) super @options[:on_view_disappear].call end |
#viewDidLoad ⇒ Object
124 125 126 127 |
# File 'lib/under_os/page.rb', line 124 def viewDidLoad super @options[:on_view_loaded].call end |
#viewWillLayoutSubviews ⇒ Object
139 140 141 142 |
# File 'lib/under_os/page.rb', line 139 def viewWillLayoutSubviews super @options[:on_view_rerender].call end |