Class: MPViewController
- Inherits:
-
UIViewController
- Object
- UIViewController
- MPViewController
- Defined in:
- motion-prime/support/mp_view_controller.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #didRotateFromInterfaceOrientation(orientation) ⇒ Object
- #shouldAutorotate ⇒ Object
- #shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
- #viewDidAppear(animated) ⇒ Object
- #viewDidDisappear(animated) ⇒ Object
- #viewDidLoad ⇒ Object
- #viewWillAppear(animated) ⇒ Object
- #viewWillDisappear(animated) ⇒ Object
- #willRotateToInterfaceOrientation(orientation, duration: duration) ⇒ Object
Class Method Details
.new(args = {}) ⇒ Object
2 3 4 5 6 |
# File 'motion-prime/support/mp_view_controller.rb', line 2 def self.new(args = {}) self.alloc.initWithNibName(nil, bundle: nil).tap do |screen| screen.on_create(args) if screen.respond_to?(:on_create) end end |
Instance Method Details
#didRotateFromInterfaceOrientation(orientation) ⇒ Object
47 48 49 |
# File 'motion-prime/support/mp_view_controller.rb', line 47 def didRotateFromInterfaceOrientation(orientation) self.on_rotate end |
#shouldAutorotate ⇒ Object
39 40 41 |
# File 'motion-prime/support/mp_view_controller.rb', line 39 def shouldAutorotate self.should_autorotate end |
#shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
35 36 37 |
# File 'motion-prime/support/mp_view_controller.rb', line 35 def shouldAutorotateToInterfaceOrientation(orientation) self.should_rotate(orientation) end |
#viewDidAppear(animated) ⇒ Object
18 19 20 21 |
# File 'motion-prime/support/mp_view_controller.rb', line 18 def viewDidAppear(animated) super self.view_did_appear(animated) if self.respond_to?("view_did_appear:") end |
#viewDidDisappear(animated) ⇒ Object
28 29 30 31 32 33 |
# File 'motion-prime/support/mp_view_controller.rb', line 28 def viewDidDisappear(animated) if self.respond_to?("view_did_disappear:") self.view_did_disappear(animated) end super end |
#viewDidLoad ⇒ Object
8 9 10 11 |
# File 'motion-prime/support/mp_view_controller.rb', line 8 def viewDidLoad super self.view_did_load if self.respond_to?(:view_did_load) end |
#viewWillAppear(animated) ⇒ Object
13 14 15 16 |
# File 'motion-prime/support/mp_view_controller.rb', line 13 def viewWillAppear(animated) super self.view_will_appear(animated) if self.respond_to?("view_will_appear:") end |
#viewWillDisappear(animated) ⇒ Object
23 24 25 26 |
# File 'motion-prime/support/mp_view_controller.rb', line 23 def viewWillDisappear(animated) self.view_will_disappear(animated) if self.respond_to?("view_will_disappear:") super end |
#willRotateToInterfaceOrientation(orientation, duration: duration) ⇒ Object
43 44 45 |
# File 'motion-prime/support/mp_view_controller.rb', line 43 def willRotateToInterfaceOrientation(orientation, duration:duration) self.will_rotate(orientation, duration) end |