Skip to content

Instantly share code, notes, and snippets.

@ShawnCBerg
Created January 5, 2014 18:10
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 ShawnCBerg/8271743 to your computer and use it in GitHub Desktop.
Save ShawnCBerg/8271743 to your computer and use it in GitHub Desktop.
Testing with iOS Simulator - iPad - 7.0.3 Titanium SDK: 3.2.0 NavigationWindows do not respect zIndex settings and instead are stacked in the order in which they are opened. Changing the zIndex after the NavigationWindows are opened has no effect. When these 2 NavigationWindows open you *should* see the green NavigationWindow (top) taking up the…
$.top.open();
$.bottom.open();
// If we open in this order it works properly
//$.bottom.open();
//$.top.open();
<Alloy>
<NavigationWindow id="bottom" zIndex="0" top="0" height="75%" backgroundColor="#ff0000">
<Window></Window>
</NavigationWindow>
<NavigationWindow id="top" zIndex="9999" top="200" height="Titanium.UI.FILL" backgroundColor="#00ff00">
<Window></Window>
</NavigationWindow>
</Alloy>
@stephenfeather
Copy link

Confirmed in 3.2.0.GA. Same behavior in classic:

var windowBottom = Ti.UI.createWindow();
var windowTop = Ti.UI.createWindow();

var bottom = Ti.UI.iOS.createNavigationWindow({
zIndex:0, top:0, height:"75%", backgroundColor:"#ff0000",
window: windowBottom
})

var top = Ti.UI.iOS.createNavigationWindow({
zIndex:1, top:200, height:Titanium.UI.FILL, backgroundColor:"#00ff00",
window: windowTop
})

top.open();
bottom.open();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment