lib/under_os/ui/image.rb in under-os-1.2.0 vs lib/under_os/ui/image.rb in under-os-1.2.1

- old
+ new

@@ -14,16 +14,17 @@ def src @_.image end def src=(src) - src = UIImage.imageNamed(src) if src.is_a?(String) + src = UIImage.imageNamed(src) if src.is_a?(String) + src = UIImage.imageWithData(src) if src.is_a?(NSData) @_.image = src end def load(url, options={}, &complete) UnderOs::HTTP.get(url, options) do |response| - self.src = UIImage.imageWithData(response.data) + self.src = response.data complete.call(response) if complete && complete.arity != 0 complete.call if complete && complete.arity == 0 end end end