Skip to content

Instantly share code, notes, and snippets.

@madmanlear
Created February 24, 2011 14:50
Show Gist options
  • Save madmanlear/842241 to your computer and use it in GitHub Desktop.
Save madmanlear/842241 to your computer and use it in GitHub Desktop.
A simple scalable image view in Titanium
var scrollView = Titanium.UI.createScrollView({
contentHeight: 'auto',
contentWidth: 'auto',
maxZoomScale: 100,
minZoomScale: 1,
showHorizontalScrollIndicator: true,
showVerticalScrollIndicator: true,
top: 0
});
image = Titanium.UI.createImageView({
image: '../images/file_name.jpg'
});
scrollView.add(image);
win.add(scrollView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment