module ProMotion::ScreenModule::ClassMethods
Public Instance Methods
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