mirror of
https://github.com/zhigang1992/redpotion.git
synced 2026-06-16 13:20:05 +08:00
13 lines
427 B
Ruby
13 lines
427 B
Ruby
class UIImageView
|
|
|
|
def remote_image=(value)
|
|
if self.respond_to?("setImageWithURL:placeholder:")
|
|
value = NSURL.URLWithString(value) unless value.is_a?(NSURL)
|
|
self.setImageWithURL(value, placeholder:self.image)
|
|
else
|
|
puts "\n[RedPotion ERROR] tried to set remote_image without JMImageCache cocoapod. Please add this to your Rakefile: \n\napp.pods do\n pod \"JMImageCache\"\nend\n"
|
|
end
|
|
end
|
|
|
|
end
|