lib/ProMotion/screen/screen_module.rb in ProMotion-2.0.0 vs lib/ProMotion/screen/screen_module.rb in ProMotion-2.0.1

- old
+ new

@@ -25,11 +25,11 @@ def resolve_title case self.class.title_type when :text then self.title = self.class.title when :view then self.navigationItem.titleView = self.class.title - when :image then self.navigationItem.titleView = UIImageView.alloc.initWithImage(UIImage.imageNamed(self.class.title)) + when :image then self.navigationItem.titleView = UIImageView.alloc.initWithImage(self.class.title) else PM.logger.warn("title expects string, UIView, or UIImage, but #{self.class.title.class.to_s} given.") end end @@ -176,10 +176,10 @@ def title_type @title_type || :text end def title_image(t) - @title = t + @title = t.is_a?(UIImage) ? t : UIImage.imageNamed(t) @title_type = :image end def title_view(t) @title = t