Created
July 15, 2011 03:31
-
-
Save levi730/1084006 to your computer and use it in GitHub Desktop.
how to do subwindow with nav using struct
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
/** | |
* Appcelerator Titanium Platform | |
* Copyright (c) 2009-2011 by Appcelerator, Inc. All Rights Reserved. | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
**/ | |
// Code is stripped-down version of Tweetanium, to expose new structure paradigm | |
(function(){ | |
S.ui.createFooWin = function(){ | |
var win = Ti.UI.createWindow({backgroundColor: "red",title:"foo"}); | |
win.add(Ti.UI.createLabel(S.combine({text: "See blogpost @ http://blog.krawaller.se"},$$.Label))); | |
var button = Titanium.UI.createButton({ | |
title: 'Hello', | |
height: '20px' | |
}); | |
button.addEventListener('click',function(e) | |
{ | |
subwin = S.ui.createsubwin(); | |
subwin.open(); | |
}); | |
win.add(button); | |
return win; | |
}; | |
S.ui.createsubwin = function(){ | |
var win = Ti.UI.createWindow({backgroundColor: "red",title:"test sub"}); | |
win.add(Ti.UI.createLabel(S.combine({text: "Subwin test."},$$.Label))); | |
return win; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment