Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[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 Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
ReporterSundev Lohr
AssigneeUnknown
Created2013-09-20T19:56:46.000+0000
Updated2018-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();

Comments

  1. Martin van Mierloo 2013-10-05

  2. Radamantis Torres-Lechuga 2013-10-07

    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
  3. Sundev Lohr 2013-10-07

    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.
  4. Radamantis Torres-Lechuga 2013-10-08

    [~sundev] , The code provided in the ticket works, also with the following modification:
       
       var win1 = Ti.UI.createWindow({
           barColor:'#ff0000',
           extendEdges: [Ti.UI.EXTEND_EDGE_ALL],
           statusBarStyle:Titanium.UI.iPhone.StatusBar.TRANSLUCENT_BLACK,
           backgroundColor: "white"
       });
        
        
       var win2 = Ti.UI.createWindow({
           barColor:'#ff0000',
           extendEdges: [Ti.UI.EXTEND_EDGE_ALL],
           statusBarStyle:Titanium.UI.iPhone.StatusBar.TRANSLUCENT_BLACK
       });
       
  5. Sundev Lohr 2013-10-08

    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.
  6. Radamantis Torres-Lechuga 2013-10-08

    [~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.
  7. Sundev Lohr 2013-10-08

    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.
  8. René Wilby 2013-10-10

    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
  9. Low Bird 2013-10-24

    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)

JSON Source