Skip to content

Instantly share code, notes, and snippets.

@alanleard
Created November 7, 2011 19:08
Show Gist options
  • Save alanleard/1345841 to your computer and use it in GitHub Desktop.
Save alanleard/1345841 to your computer and use it in GitHub Desktop.
Scrollviews with Zoom inside a Scollableview
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var scrollable = Ti.UI.createScrollableView({
top:0,
bottom:0,
left:0,
right:0,
showPagingControl:true,
pagingControlHeight:10
});
var sViews =[];
for(i=0; i<5; i++){
var scroll = Ti.UI.createScrollView({
top:0,
contentHeight:'auto',
contentWidth:'auto',
bottom:0,
minZoomScale:0.0,
maxZoomScale:3.0
});
var view = Ti.UI.createView({
backgroundImage:'KS_nav_ui.png',
top:50,
width:200,
height:200
});
scroll.add(view);
sViews.push(scroll);
}
scrollable.views = sViews;
win1.add(scrollable);
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment