Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5420] Add splitWindow BarColor property

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 1.8.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterAlan Leard
AssigneeEric Merriman
Created2011-10-03T17:05:59.000+0000
Updated2018-08-02T17:31:47.000+0000

Description

Please add the barColor property to Ti.UI.iPad.createSplitWindow. Currently bar is always gray.
var tabgroup = Ti.UI.createTabGroup();

SplitViewNav = {};

// WINDOWS
SplitViewNav.masterWindow = Ti.UI.createWindow({title:'Master',backgroundColor:'red', barColor:'blue'});
SplitViewNav.detailWindow = Ti.UI.createWindow({title:'Detail',backgroundColor:'blue', barColor:'red'});

// MASTER NAV GROUP
SplitViewNav.masterNav = Ti.UI.iPhone.createNavigationGroup({
	window:SplitViewNav.masterWindow
});

// DETAIL NAV GROUP
SplitViewNav.detailNav = Ti.UI.iPhone.createNavigationGroup({
	window:SplitViewNav.detailWindow
	
});

// SPLIT VIEW
SplitViewNav.splitView = Titanium.UI.iPad.createSplitWindow({
	masterView:SplitViewNav.masterNav,
	detailView:SplitViewNav.detailNav,
	barColor:'red'
});

SplitViewNav.open = function()
{
	Ti.API.info('in open for split view nav');
	SplitViewNav.splitView.open();	
};

SplitViewNav.splitView.addEventListener('visible', function(e) {

	if (e.view == 'detail') {
		e.button.title = "Popover";
		SplitViewNav.detailWindow.leftNavButton = e.button;
	}
	else if (e.view == 'master') {
		SplitViewNav.detailWindow.leftNavButton = null;
	}
});

var tab1 = Ti.UI.createTab({
	window:SplitViewNav.splitView
});

tabgroup.addTab(tab1);
tabgroup.open();

Comments

  1. Blain Hamon 2011-10-03

    Why is the sample code putting a split view into a tabGroup?
  2. Alan Leard 2011-10-03

    That is what the customer is trying to do and what exposes the splitWindow bar color. The customer has acknowledged that it may be against Apple HIG, but there are other apps (release by apple) that do this.

JSON Source