-
-
Save srahim/1440723 to your computer and use it in GitHub Desktop.
example
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
Titanium.UI.setBackgroundColor('#000'); | |
//creating the window | |
var win1 = Titanium.UI.createWindow({ | |
title:'win 1', | |
backgroundColor:'#fff' | |
}); | |
//add window - navigation bar | |
var modalWin = Ti.UI.createWindow(); | |
//nav bar | |
var navmodal = Ti.UI.iPhone.createNavigationGroup({ | |
window:modalWin | |
}); | |
win1.add(navmodal); | |
//button for the nav bar | |
var b2t = Titanium.UI.createButton({ | |
title:'Launch' | |
}); | |
modalWin.RightNavButton = b2t; | |
//button for the window | |
var b1t = Titanium.UI.createButton({ | |
title:'Launch', | |
height:40, | |
width:200, | |
top:270 | |
}); | |
win1.add(b1t); | |
//Setting up the documentviewer | |
z = Ti.UI.iPad.createDocumentViewer({url:'Example.pdf'}); | |
//documentviewer with animation set on and a quicklook view poping up next to a view | |
b1t.addEventListener('click', function(){z.show({animated:false,view:b2t});}); | |
//documentviewer with animation set off | |
b2t.addEventListener('click', function(){z.show();}); | |
win1.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment