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
|