[TIMOB-1621] iOS: navBarHidden/tabBarHidden assignments do not have immediate effect
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-05-02T17:47:52.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | api |
Reporter | Glen |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T02:57:35.000+0000 |
Updated | 2017-06-26T17:51:45.000+0000 |
Description
Setting navBarHidden/tabBarHidden values only take effect once
you switch to another tab.
Once they're hidden, there is no way to unhide them without closing the window. Ideally, displaying them again should be this easy:
Ti.UI.currentWindow.addEventListener('click', function(e) {
Ti.UI.currentWindow.navBarHidden = false;
Ti.UI.currentWindow.tabBarHidden = false;
} );
Because the effect is not immediate, making a photo gallery operate like the default iOS photos app is impossible.
I second that. Somebody recommended
but this causes an ugly flicker.
Another reference ticket: http://developer.appcelerator.com/helpdesk/view/65781">http://developer.appcelerator.com/helpdesk/view/65781
Once hiding a tabBar, no child windows can show that tabBar again.
Basically, you pass in your base window and tab group to subsequent windows, and do the operations above. This extremely sloppy solution works to hide the tab bar, but how do you get the tab group to show again after hiding. (e.g. go back in the navigation group stack). This doesn't work: var thisWindow = Titanium.UI.currentWindow; thisWindow._base.tabBarHidden = false; thisWindow._tabGroup.setActiveTab(1); // hack to hide tabs thisWindow._tabGroup.setActiveTab(0); // and update the screen Ti.API.info("tabBarHidden=" + thisWindow._base.tabBarHidden); Ideally, the bug would be fixed and toggling tabBarHidden would work (preferably on the current window, not the base), but I'm desperate for any solution at this point. This is ruining my application. PLEASE HELP! :)
It's worth noting that the underlying native API is 'hidesBottomBarWhenPushed', and is meant to be set and forget. That is, there is no intent by Apple to hide and show the tab bar at will (The fact you can by swapping tabs is probably unintended behavior on Apple's part) and the fact no child windows will reveal the tab bar is expected behavior by Apple.
Still valid on SDK 2.2.0.f9e938d. Test code:
Tested on TiSDK 2.2.0v 20120816015712 using iOS simulator, issue still valid.
Resolving ticket as Cannot Reproduce, using the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.4 GA Appc NPM 4.2.9 Appc CLI 6.2.0 Ti CLI 5.0.12 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.7.0_80