[TIMOB-15493] iOS7: If a map is loaded into a window in a tab group, the navbar color is not maintained if the navbar is set to translucent
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.1.3 |
Fix Version/s | n/a |
Components | iOS |
Labels | SupportTeam |
Reporter | Sundev Lohr |
Assignee | Unknown |
Created | 2013-09-20T19:56:46.000+0000 |
Updated | 2018-02-28T20:03:14.000+0000 |
Description
On the device, if you create a tabgroup and in one of the windows, you add a mapview, then you switch between the tabs. If the navbar has a specific color set and it is set to translucent, the navbar color will change to black. It works as expected on the simulator.
var win1 = Ti.UI.createWindow({
barColor:'#ff0000',
extendEdges: [Ti.UI.EXTEND_EDGE_ALL],
})
var win2 = Ti.UI.createWindow({
barColor:'#ff0000',
extendEdges: [Ti.UI.EXTEND_EDGE_ALL],
})
var mapview2 = Ti.Map.createView();
win2.add(mapview2);
var tab1 = Ti.UI.createTab({
title:L('Window 1'),
window:win1
});
var tab2 = Ti.UI.createTab({
title:L('Map'),
window:win2
});
var self = Ti.UI.createTabGroup({
tabs:[tab1,tab2]
});
self.open();
Please refer to the following [document](http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_7_Migration_Guide-section-37533766_iOS7MigrationGuide-SummaryofChangestotheTitaniumSDK) - On iOS 7, the status bar and navigation bar are translucent by default. On iOS 6 and prior, they are not translucent. - The status bar is controlled by the currently displayed window and can no longer be controlled on the fly in iOS 7. This is working as expected on iOS7
Yes, I've read that document and can accurately get a translucent navigation bar to be a certain color, but when you add a map to a window, the translucent navbar turns to black regardless of the color set. If you can post code that loads a map in a window and keeps a translucent navbar a certain color when switching between tabbar views on the device, then I'll concede it's not a bug.
[~sundev] , The code provided in the ticket works, also with the following modification:
The code you posted of course works, but put a map in there and add tabs and see if you can get the navbar to stay white. Also, it works fine on the simulator, but not on my 4s or the duplicate ticket's 4.
[~sundev] The code that I posted is to modified the original code in the ticket, using that piece of code with the combination of the tabs and the maps, it's still working.
Still not working on device. Works initially for first window, then for second tab, but when go back to first, the first window's navbar changes to black and is no longer red.
I'm experiencing the same behavior Sendev Lohr describes on an iPhone 4 and iPad 2 each of them with the latest iOS 7. On an iPhone 5 with iOS 7 the code Sundev Lohr posted works fine. I'm using Titanium SDK 3.1.3.GA
I can confirm that this only happens on device, not in the simulator. Tested on iPhone4 and iPad2 with iOS7. Only happens if the windows have transculent: true (default)