Created
November 7, 2011 19:08
-
-
Save alanleard/1345841 to your computer and use it in GitHub Desktop.
Scrollviews with Zoom inside a Scollableview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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