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
95 96 97 98 99 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 95 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
117 118 119 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 117 def get_tint_color @tint_color || nil end |
#status_bar(visible = true, opts = {}) ⇒ Object
90 91 92 93 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 90 def (visible = true, opts={}) @status_bar_visible = visible @status_bar_opts = opts end |
#status_bar_animation(opt) ⇒ Object
101 102 103 104 105 106 107 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 101 def (opt) { fade: UIStatusBarAnimationFade, slide: UIStatusBarAnimationSlide, none: UIStatusBarAnimationNone }[opt] || UIStatusBarAnimationNone end |
#tint_color(c) ⇒ Object
109 110 111 |
# File 'lib/ProMotion/delegate/delegate_module.rb', line 109 def tint_color(c) @tint_color = c 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 |