app/controllers/demo_controller.rb in status_bar-0.2 vs app/controllers/demo_controller.rb in status_bar-0.2.1
- old
+ new
@@ -1,9 +1,11 @@
class DemoController < UIViewController
- stylesheet :demo
+ stylesheet :demo_sheet
- layout :demo_view do
+ attr_reader :status_bar
+
+ layout :demo do
@container = subview(UIView, :container) do
@show_notice_button = subview(UIButton.buttonWithType(UIButtonTypeRoundedRect), :show_notice_button)
@show_activity_button = subview(UIButton.buttonWithType(UIButtonTypeRoundedRect), :show_activity_button)
@show_success_button = subview(UIButton.buttonWithType(UIButtonTypeRoundedRect), :show_success_button)
@show_error_button = subview(UIButton.buttonWithType(UIButtonTypeRoundedRect), :show_error_button)
@@ -12,11 +14,9 @@
end
end
def viewDidLoad
super
-
- ap "first viewDidLoad"
@status_bar = StatusBar::Base.new
@show_notice_button.when(UIControlEventTouchUpInside) {
@status_bar.show_notice "This is a notice"
\ No newline at end of file