Skip to content

Instantly share code, notes, and snippets.

@jonalter
Created April 11, 2011 21:33
Show Gist options
  • Save jonalter/914397 to your computer and use it in GitHub Desktop.
Save jonalter/914397 to your computer and use it in GitHub Desktop.
ImageView download changed image, remove cache
var win = Ti.UI.createWindow({
backgroundColor: 'yellow'
});
var imageView = Titanium.UI.createImageView();
win.add(imageView);
imageView.image = 'http://localhost/~jalter/GitApp/images/test.jpg?time='+new Date().getTime();
var button = Ti.UI.createButton({
title: 'click',
height: 50,
width: 100,
top: 20
});
button.addEventListener('click', function(e){
// imageView.image = 'http://localhost/~jalter/GitApp/images/test.jpg';
imageView.image = 'http://localhost/~jalter/GitApp/images/test.jpg?time='+new Date().getTime();
});
win.add(button);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment