Sha256: 3bb14b741dc4a11c21851549858f0ebec3416983efe69acb83bb1240a6a7aff5

Contents?: true

Size: 450 Bytes

Versions: 51

Compression:

Stored size: 450 Bytes

Contents

module MotionPrime
  class ImageElement < BaseElement
    after_render :fetch_image
    def view_class
      "UIImageView"
    end

    def fetch_image
      return unless computed_options[:url]
      raise "You must set default image for `#{name}`" unless computed_options[:default]
      view.setImageWithURL NSURL.URLWithString(computed_options[:url]),
                        placeholderImage: computed_options[:default].uiimage
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
motion-prime-1.0.5 motion-prime/elements/image.rb
motion-prime-1.0.4 motion-prime/elements/image.rb
motion-prime-1.0.3 motion-prime/elements/image.rb
motion-prime-1.0.2 motion-prime/elements/image.rb
motion-prime-1.0.1 motion-prime/elements/image.rb
motion-prime-1.0.0 motion-prime/elements/image.rb
motion-prime-0.9.9.2 motion-prime/elements/image.rb
motion-prime-0.9.9.1 motion-prime/elements/image.rb
motion-prime-0.9.9 motion-prime/elements/image.rb
motion-prime-0.9.8 motion-prime/elements/image.rb
motion-prime-0.9.7 motion-prime/elements/image.rb
motion-prime-0.9.6 motion-prime/elements/image.rb
motion-prime-0.9.5 motion-prime/elements/image.rb
motion-prime-0.9.4 motion-prime/elements/image.rb
motion-prime-0.9.3 motion-prime/elements/image.rb
motion-prime-0.9.2 motion-prime/elements/image.rb
motion-prime-0.9.1 motion-prime/elements/image.rb
motion-prime-0.9.0 motion-prime/elements/image.rb
motion-prime-0.8.12 motion-prime/elements/image.rb
motion-prime-0.8.11 motion-prime/elements/image.rb