[TIMOB-9832] iOS: Warning shown when removing the last tab from a tabgroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-06-19T21:29:05.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | api, parity |
Reporter | Sabil Rahim |
Assignee | Eric Merriman |
Created | 2012-06-28T12:13:57.000+0000 |
Updated | 2017-06-19T21:29:05.000+0000 |
Description
The following warning is shown when the last tab from the tabgroup is removed.
-[UITabBarController setSelectedViewController:] only a view controller in the tab bar controller's list of view controllers can be selected.
Steps to reproduce
1. copy the following code to app.js 2. Click on remove tab2 and remove tab1 labels. 3. warning appear on the consolveCurrent Behavior
Warning is shown when removing the final tab.Expected Behavior
No Warning should be shown when removing the final tab.
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'Remove Tab1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
label1.addEventListener('click', function() {
tabGroup.removeTab(tab1);
label1 = win1 = tab1 = null;
});
win1.add(label1);
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'remove tab2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
label2.addEventListener('click', function() {
tabGroup.removeTab(tab2);
label2 = win2 = tab2 = null;
});
win2.add(label2);
// add tabs
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
// open tab group
tabGroup.open();
Sabil, what is the wording of the warning so that people can recognize it?
incomplete test case
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.v20170609091155 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