var win = Ti.UI.createWindow({
orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]
});
var navWin = Ti.UI.iOS.createNavigationWindow({window: win});
var button = Ti.UI.createButton({
width: 200,
height: 50,
title: "Open New Window"
});
button.addEventListener("click", function() {
var win2 = Ti.UI.createWindow({
orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT]
});
navWin.openWindow(win2);
});
win.add(button);
navWin.open();
Opening win2 by clicking the button, after opening the window change the orientation of the simulator to either landscape then press the navigation windows back button, now the all the sudden the StatusBar is gone from the application, rotating the simulator back to portrait will bring it back but shouldn't it appear as soon as the forced orientation change is made?
Problem can be reproduced on IOS 8.1 and SDK 3.4.0.
I can confirm: Ti.UI.Window as main container: https://gist.github.com/sfeather/0c480fde2bbde3f27a22 Ti.UI.iOS.NavigationWindow as main container: https://gist.github.com/sfeather/dfe3c329887ae1f903db Ti.UI.TabGroup as main container: https://gist.github.com/sfeather/7b867201ef648a9d9e21 dk.napp.drawer as main container. The key seems to be that if the orientation of the device changes while the child is open, then the main container refresh breaks. http://content.screencast.com/users/Stephen_Feather/folders/Jing/media/5d152d89-5471-4fdf-a3e4-1dc983bd9b30/00000825.png Last known working SDK would have been around 3.2.3 (this is based solely upon commits and delivery of an app that had similar functionality) Tested with 3.4.1.GA, 3.5.0.GA, 3.6.0.v20150120195731. *This prevents the shipping of two apps.*
I do know that Apple deprecated the usage of forced orientation modes, leading us to deprecate similar usages in 3.4.0: http://docs.appcelerator.com/titanium/release-notes/?version=3.4.0.GA#deprecated_ios [~jalter], [~vduggal], thoughts?
This behavior is intentional. It is bad UI design to force orientations and we will be dropping support for forcing orientations in a future release. If you really want to do this, use modal windows.
Example