Loading online images
I'm trying to load images from an online host, like this:
Ti.API.info("http://www.example.com/images/" + product.getName() + ".jpg");
var image = Ti.API.createImageView({
image: "http://www.example.com/images/" + product.getName() + ".jpg",
});
view.add(image);
Everytime I do this, my app crashes, I uploaded the error here: http://pastebin.com/2Fqkf8fz
It's a valid image, when I open it up in my browser, it shows up.
The image is 200x200
1 Answer
-
Accepted Answer
Hi Wouter
Your error is in the command, var image = Ti.API.createImageView({}). It should be, var image = Ti.UI.createImageView({}).
Cheers
Hal