I have the following setup: On ApplicationTabGroup.js
I have a tabgroup
var tabGroup = Ti.UI.createTabGroup();
with 2 tabs.
One of those tabs calls an external URL, here is the code
//Restaurant Window
var restaurant = Titanium.UI.createWindow({
tabBarHidden:true,
color: '#FFF',
url: 'restaurants.js',
navBarHidden:false,
statusBarStyle: Titanium.UI.iPhone.StatusBar.TRANSLUCENT_BLACK
});
var tab2 = Ti.UI.createTab({
title:"x",
color: '#FFF',
backgroundColor:'#00c0f3',
window: restaurant
});
And I open that tab with an EventListener like this
tabGroup.setActiveTab(tab2).open();
The problem is that from restaurant.js
I don't know how to get back to the first tab, or any other tab because the tabgroup
in restaurant.js
is not defined.
How can I navigate through tabs that are called in different URLs when the tabgroup is just defined in ApplicationTabGroup.js
?
I am using - iOS7 - SDK 3.1.3 GA
Any tip in the right direction will be much appreciated!