Titanium远程imageView不会更新

时间:2013-08-22 14:08:46

标签: imageview titanium

我正在为公司制作一种新闻应用程序,我需要我的应用程序来加载图像,但如果您更新新闻,则网址中的图像会发生变化,但如果我更新它,我会再次加载应用程序,图像仍显示上一张图像。

这是我的代码;

    imageremote = Ti.UI.createImageView({
         image: "http://www.mydomain.com/"+company+"/image0001.png"
    });

    win.add(imageremote);
    win.open();

1 个答案:

答案 0 :(得分:2)

尝试在网址上添加一个唯一的参数,以便不缓存网址

imageremote = Ti.UI.createImageView({
     image: "http://www.mydomain.com/"+company+"/image0001.png" + "?t=" + new Date()
});

win.add(imageremote);
win.open();
相关问题