2013-08-22 74 views
0

我正在爲一家公司的新聞應用程序,我需要我的應用程序加載圖像,但如果你更新新聞,但URL中的圖像更改,但如果我更新它,並且我再次加載應用程序,圖像仍然顯示上一張圖像。鈦遠程imageView不更新

這是我的代碼;

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

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

回答

1

嘗試在URL加入了獨特的PARAM這樣的URL是不緩存

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

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

謝謝,我會努力的! –