Class: DemoController
- Inherits:
-
UIViewController
- Object
- UIViewController
- DemoController
- Defined in:
- app/controllers/demo_controller.rb
Instance Attribute Summary collapse
-
#status_bar ⇒ Object
readonly
Returns the value of attribute status_bar.
Instance Method Summary collapse
Instance Attribute Details
#status_bar ⇒ Object (readonly)
Returns the value of attribute status_bar.
4 5 6 |
# File 'app/controllers/demo_controller.rb', line 4 def @status_bar end |
Instance Method Details
#shouldAutorotate ⇒ Object
47 48 49 |
# File 'app/controllers/demo_controller.rb', line 47 def shouldAutorotate true end |
#viewDidLoad ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/demo_controller.rb', line 17 def viewDidLoad super @status_bar = StatusBar::Base.new @show_notice_button.when(UIControlEventTouchUpInside) { @status_bar.show_notice "This is a notice" } @show_activity_button.when(UIControlEventTouchUpInside) { @status_bar.show_activity_notice "Something's going on" } @show_success_button.when(UIControlEventTouchUpInside) { @status_bar.show_success_notice "Wohoo... made it!" } @show_error_button.when(UIControlEventTouchUpInside) { @status_bar.show_error_notice "Aww... no go" } @hide_notice_button.when(UIControlEventTouchUpInside) { @status_bar.hide_notice } @visibility_button.when(UIControlEventTouchUpInside) { ap @status_bar.visible? } end |