Can you add a TabGroup to a SplitWindow?
I'm trying to add a TabGroup to the masterView of a SplitWindow.
Here is my code:
// WINODWS
var masterWindow = Ti.UI.createWindow({
backgroundColor:'#fff'
});
var detailWindow = Ti.UI.createWindow({
backgroundColor:'#fff',
titleImage:'images/logo.png'
});
// TAB GROUP
var tabGroup = Titanium.UI.createTabGroup();
var categories = Titanium.UI.createWindow({
title:'Categories'
});
var tabCategories = Titanium.UI.createTab({
title:'Categories',
window:categories
});
tabGroup.addTab(tabCategories);
masterWindow.add(tabGroup);
// DETAIL NAV GROUP
var detailNav = Ti.UI.iPhone.createNavigationGroup({
window:detailWindow
});
// SPLIT VIEW
var splitView = Titanium.UI.iPad.createSplitWindow({
masterView:masterWindow,
detailView:detailNav
});
// TABS
var categories = Titanium.UI.createWindow({
title:'Categories'
});
var newsTab = Titanium.UI.createTab({
icon:'images/tabs/KS_nav_views.png',
title:'Base UI',
window:categories
});
// OPEN SPLIT WINDOW
splitView.open();
Can this be done? Am I on the right track?
1 Answer
-
add
tabGroup.open
at last line.