Module: ProMotion::StatusBarModule::ClassMethods

Defined in:
lib/ProMotion/screen/status_bar_module.rb

Instance Method Summary collapse

Instance Method Details

#status_bar(style = nil, args = {}) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/ProMotion/screen/status_bar_module.rb', line 53

def status_bar(style = nil, args = {})
  info_plist_setting = NSBundle.mainBundle.objectForInfoDictionaryKey('UIViewControllerBasedStatusBarAppearance')
  if info_plist_setting == false
    mp "The default behavior of `status_bar` has changed. Calling `status_bar` will have no effect until you remove the 'UIViewControllerBasedStatusBarAppearance' setting from info_plist.", force_color: :yellow
  end
  @status_bar_style = style
  @status_bar_animation = args[:animation] if args[:animation]
end

#status_bar_animation(val = nil) ⇒ Object



67
68
69
70
# File 'lib/ProMotion/screen/status_bar_module.rb', line 67

def status_bar_animation(val = nil)
  @status_bar_animation = val if val
  @status_bar_animation
end

#status_bar_style(val = nil) ⇒ Object



62
63
64
65
# File 'lib/ProMotion/screen/status_bar_module.rb', line 62

def status_bar_style(val = nil)
  @status_bar_style = val if val
  @status_bar_style
end