Created
March 9, 2014 04:09
-
-
Save yagitoshiro/9442803 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 win = Ti.UI.createWindow({backgroundColor: '#FFFFFF', tabBarHidden:true, title: '素敵な右側'}); | |
var detailNav = Ti.UI.iOS.createNavigationWindow({window:win}); | |
var masterWindow = Ti.UI.createWindow({backgroundColor:'#FFFFFF', tabBarHidden:true, title:'ナイス左側'}); | |
var rows = []; | |
for( var i = 0; i < 5; i++ ){ | |
rows.push(Ti.UI.createTableViewRow({ | |
title: "title " + (i+1), | |
hasChild: true | |
})); | |
} | |
masterWindow.add(Ti.UI.createTableView( {rowHeight:38, top: 0, data: rows })); | |
var masterNav = Ti.UI.iOS.createNavigationWindow({window: masterWindow}); | |
var splitWindow = Ti.UI.iPad.createSplitWindow({ | |
detailView: detailNav, | |
masterView: masterNav, | |
showMasterInPortrait: true | |
}); | |
splitWindow.open(); | |
masterWindow.addEventListener('click', function(e){ | |
var new_win = Ti.UI.createWindow({title: '新しい右側', backgroundColor:'#fff'}); | |
detailNav.openWindow(new_win); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment