Module: ProMotion::DelegateModule::ClassMethods
- Defined in:
- lib/ProMotion/delegate/delegate_module.rb
Instance Method Summary collapse
- #apply_status_bar ⇒ Object
- #get_tint_color ⇒ Object
- #status_bar(visible = true, opts = {}) ⇒ Object
- #status_bar_animation(opt) ⇒ Object
- #tint_color(c) ⇒ Object
- #tint_color=(c) ⇒ Object
Instance Method Details
#apply_status_bar ⇒ Object
99 100 101 102 103 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 99 def @status_bar_visible ||= true @status_bar_opts ||= { animation: :none } UIApplication.sharedApplication.setStatusBarHidden(!@status_bar_visible, withAnimation:(@status_bar_opts[:animation])) end |
#get_tint_color ⇒ Object
121 122 123 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 121 def get_tint_color @tint_color || nil end |
#status_bar(visible = true, opts = {}) ⇒ Object
94 95 96 97 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 94 def (visible = true, opts={}) @status_bar_visible = visible @status_bar_opts = opts end |
#status_bar_animation(opt) ⇒ Object
105 106 107 108 109 110 111 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 105 def (opt) { fade: UIStatusBarAnimationFade, slide: UIStatusBarAnimationSlide, none: UIStatusBarAnimationNone }[opt] || UIStatusBarAnimationNone end |
#tint_color(c) ⇒ Object
113 114 115 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 113 def tint_color(c) @tint_color = c end |
#tint_color=(c) ⇒ Object
117 118 119 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 117 def tint_color=(c) @tint_color = c end |