class RMQImageUtils

Constants

DEFAULT_IMAGE_EXT

Public Class Methods

resource(file_base_name, opts = {}) click to toggle source

@return [UIImage]

# File lib/project/ruby_motion_query/rmq_image.rb, line 18
def resource(file_base_name, opts = {})
  ext = opts[:ext] || DEFAULT_IMAGE_EXT
  #cached = opts[:cached]
  #cached = true if cached.nil?

  constant = R::Drawable.const_get(file_base_name.capitalize)
  constant
  #if cached
    ##UIImage.imageNamed("#{file_base_name}.#{ext}")
  #else
    #R::Drawable::Foo
    #R::Drawable::Bluepotion_logo
    #file_base_name << '@2x' if RMQ.device.retina?
    #file = NSBundle.mainBundle.pathForResource(file_base_name, ofType: ext)
    #UIImage.imageWithContentsOfFile(file)
  #end
end