Skip to content

Instantly share code, notes, and snippets.

@pec1985
Created June 10, 2011 18:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pec1985/1019492 to your computer and use it in GitHub Desktop.
Save pec1985/1019492 to your computer and use it in GitHub Desktop.
Zoom-in in a scrollable view - iOS
var win = Ti.UI.createWindow();
function view(img){
var image = Ti.UI.createImageView({
url:img
});
return image;
}
var scrollable = Ti.UI.createScrollableView({
views:[
view('http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png'),
view('http://www.appcelerator.com.s3.amazonaws.com/blog/images/frontpage/webcast_graphic.png'),
view('http://www.appcelerator.com.s3.amazonaws.com/blog/images/frontpage/wunderlist.png')
],
maxZoomScale:3
});
win.add(scrollable);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment