Module: ProMotion::DelegateModule::ClassMethods

Defined in:
lib/ProMotion/delegate/delegate_module.rb

Instance Method Summary collapse

Instance Method Details

#get_tint_colorObject



136
137
138
# File 'lib/ProMotion/delegate/delegate_module.rb', line 136

def get_tint_color
  @tint_color || nil
end

#status_bar(visible = true, opts = {}) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/ProMotion/delegate/delegate_module.rb', line 107

def status_bar(visible = true, opts = {})
  info_plist_setting = NSBundle.mainBundle.objectForInfoDictionaryKey('UIViewControllerBasedStatusBarAppearance')
  if info_plist_setting == false && visible == 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 = case visible
                      when false then :hidden
                      when true  then :default
                      else visible
                      end
  @status_bar_animation = opts[:animation] || :default
end

#status_bar_animationObject



124
125
126
# File 'lib/ProMotion/delegate/delegate_module.rb', line 124

def status_bar_animation
  @status_bar_animation
end

#status_bar_styleObject



120
121
122
# File 'lib/ProMotion/delegate/delegate_module.rb', line 120

def status_bar_style
  @status_bar_style
end

#tint_color(c) ⇒ Object



128
129
130
# File 'lib/ProMotion/delegate/delegate_module.rb', line 128

def tint_color(c)
  @tint_color = c
end

#tint_color=(c) ⇒ Object



132
133
134
# File 'lib/ProMotion/delegate/delegate_module.rb', line 132

def tint_color=(c)
  @tint_color = c
end