Splitview and tabbar (ipad)
Hi ,
Is it possible to have a Splitview with a master and detail view and at the the bottom have the tabbar (or tabgroup) ?
Thanks in advance?
2 Answers
-
Here is my simple example code:
var tg = Ti.UI.createTabGroup({ }); tg.addTab(Ti.UI.createTab({ window: Ti.UI.createWindow({ title: 'almafa', backgroundColor: 'red' }), title: 'alma' })); tg.addTab(Ti.UI.createTab({ window: Ti.UI.createWindow({ title: 'kortefa', backgroundColor: 'blue' }), title: 'korte' })); var win = Ti.UI.createWindow(); var nav = Ti.UI.iPhone.createNavigationGroup({ window: win }); var splitwin = Ti.UI.iPad.createSplitWindow({ detailView: nav, masterView: tg }); splitwin.addEventListener('visible',function(e) { if (e.view == 'detail') { e.button.title = "Master"; win.leftNavButton = e.button; } else if (e.view == 'master') { tg.open(); win.leftNavButton = null; } }); splitwin.open();
-
Yes! It is posible to do almost anything you want. What exactly are you trying to do? Add a Tabgroup to the detail view, or a Tabgroup to all the view and on top of it have the detail? both ways are posible. Just create a Main Window and add both your Tabgroup and SplitView.