Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10062] iOS: tabbedBar within toolBar visibility changes disrupt positioning and tabbedBar behavior

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-21T23:23:46.000+0000
Affected Version/sRelease 2.1.0, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi
ReporterCarter Lathrop
AssigneeEric Merriman
Created2012-07-20T11:33:29.000+0000
Updated2017-06-21T23:23:46.000+0000

Description

Problem

When putting tabbedBars inside of a toolBar (on iOS), and then changing the visibility of that tabbedBar, the sizing and positioning of the tabbedBar changes unexpectedly. This method works as expected in builds 2.0.1GA and below.

Example

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
var win = Titanium.UI.createWindow({
	layout : 'vertical'
});


var btn = Ti.UI.createButton({
	title : 'Toggle!'
});

var tabbedBar1 = Ti.UI.iOS.createTabbedBar({
	labels : ['One', 'Two'],
	visible: false
});

//tabbedBar1.visible = vis;

var tabbedBar2 = Ti.UI.iOS.createTabbedBar({
	labels : ['Three', 'Four']
});

var flexSpace = Ti.UI.createButton({
	systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});

btn.addEventListener('click', function(e){
	if(tabbedBar1.visible == false){
		tabbedBar1.visible = true;
	} else {
		tabbedBar1.visible = false;
	}
	Ti.API.info(tabbedBar1.visible);
});

win.add(btn);
win.setToolbar([tabbedBar1, flexSpace, tabbedBar2]);

win.open({
	modal : true
}); 

Steps to reproduce

1. Put the code above into titanium 2. Run 3. Notice tabbed bar 'one' and 'two' 4. click toggle at top of the screen 5. Notice incorrect behavior once tabbed bar is visible again

Comments

  1. Shameer Jan 2013-04-10

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-06-21

    I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source