Skip to content

Instantly share code, notes, and snippets.

@nmerouze
Created May 20, 2010 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmerouze/407623 to your computer and use it in GitHub Desktop.
Save nmerouze/407623 to your computer and use it in GitHub Desktop.
var SplitView;
SplitView = {};
SplitView.masterButton = Ti.UI.createButton({
title: 'Open Window',
height: 50,
width: 200
});
SplitView.detailButton = Ti.UI.createButton({
title: 'Open Window',
height: 50,
width: 200,
textAlign: 'center'
});
SplitView.masterWindow = Ti.UI.createWindow({
title: 'Master',
backgroundColor: 'red'
});
SplitView.detailWindow = Ti.UI.createWindow({
title: 'Detail',
backgroundColor: '#336699'
});
SplitView.masterNav = Ti.UI.iPhone.createNavigationGroup({
window: SplitView.masterWindow
});
SplitView.detailNav = Ti.UI.iPhone.createNavigationGroup({
window: SplitView.detailWindow
});
SplitView.splitView = Titanium.UI.iPad.createSplitWindow({
masterView: SplitView.masterNav,
detailView: SplitView.detailNav
});
SplitView.masterWindow.add(SplitView.masterButton);
SplitView.detailWindow.add(SplitView.detailButton);
SplitView.splitView.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment