Skip to content

Instantly share code, notes, and snippets.

@dawsontoth
Created February 8, 2011 22:41
Show Gist options
  • Save dawsontoth/817444 to your computer and use it in GitHub Desktop.
Save dawsontoth/817444 to your computer and use it in GitHub Desktop.
Simple Titanium scrollable view with 10 images in it
// put this in an app.js and watch it fly!
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var views = [];
for (var i = 0; i < 10; i++) {
views.push(Ti.UI.createImageView({
image: 'KS_nav_ui.png',
top: 0, left: 0,
width: 100,
height: 50
}));
}
win.add(Ti.UI.createScrollableView({
views: views,
top: 0, right: 0, bottom: 0, left: 0
}));
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment