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
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
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