module ProMotion::ScreenModule::ClassMethods

Public Instance Methods

get_nav_bar() click to toggle source
# File lib/ProMotion/screen/screen_module.rb, line 229
def get_nav_bar
  @nav_bar_args ||= { nav_bar: false }
end
get_nav_bar_button() click to toggle source
# File lib/ProMotion/screen/screen_module.rb, line 240
def get_nav_bar_button
  @nav_bar_button_args ||= []
end
nav_bar(enabled, args={}) click to toggle source
nav_bar_button(side, args={}) click to toggle source
title(t=nil) click to toggle source
# File lib/ProMotion/screen/screen_module.rb, line 201
def title(t=nil)
  if t && t.is_a?(String) == false
    mp "You're trying to set the title of #{self.to_s} to an instance of #{t.class.to_s}. In ProMotion 2+, you must use `title_image` or `title_view` instead.", force_color: :yellow
    return raise StandardError
  end
  @title = t if t
  @title_type = :text if t
  @title
end
title_image(t) click to toggle source
# File lib/ProMotion/screen/screen_module.rb, line 215
def title_image(t)
  @title = t.is_a?(UIImage) ? t : UIImage.imageNamed(t)
  @title_type = :image
end
title_type() click to toggle source
# File lib/ProMotion/screen/screen_module.rb, line 211
def title_type
  @title_type || :text
end
title_view(t) click to toggle source
# File lib/ProMotion/screen/screen_module.rb, line 220
def title_view(t)
  @title = t
  @title_type = :view
end