This module can track tab's window stack and determine if root window is visible. Usefull if you open controllers from various tabs and want to react when window closes
in your tiapp.xml add module:
<moduleplatform="iphone">sk.maxapp.titabstack</module>and then:
constTiTabstack=require('ti.tabstack');// Is root shown on a tab?if(TiTabstack.isRootVisible($.homeTab)){// do something}// Get count / top titleconstcount=TiTabstack.stackCount($.homeTab);consttop=TiTabstack.topTitle($.homeTab);// On tab switch$.tabGroup.addEventListener('focus',e=>{constinfo=TiTabstack.infoForSelectedTab($.tabGroup);Ti.API.debug(info.debugPath);});