You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched and made sure there are no existing issues for the issue I am filing
I have searched the existing issues
Description
When trying to open a TabGroup withing a NavigationWindow the app will crash with
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UITabBarController: 0x10f838400> should have parent view controller:<TiViewController: 0x10e739260> but requested parent is:<TiRootViewController: 0x11181bc00>
In this PR d334ac9
some code was removed in iphone/Classes/TiUITabGroupProxy.m to fix iOS animations issues. When adding that back it won't crash.
-(void)windowDidOpen{// Set parent view controller for UITabBarController
TiUITabGroup *tabGroup=(TiUITabGroup*)self.view;if(tabGroup){UITabBarController*tabController=[tabGrouptabController];UIViewController*parentController=[selfwindowHoldingController];[parentControlleraddChildViewController:tabController];[tabControllerdidMoveToParentViewController:parentController];}[superwindowDidOpen];}
Expected Behavior
show the TabGroup inside the NavigationWindow
Actual behavior
Crash
Reproducible sample
// Main window creationvarmainWindow=Ti.UI.createWindow({backgroundColor: '#fff'});// NavigationWindow creationvarnavWindow=Ti.UI.createNavigationWindow({window: mainWindow});// Button creationvarbutton=Ti.UI.createButton({title: 'Apri TabGroup'});// Adding the button to the main windowmainWindow.add(button);// Windows creation for the tabsvaryellowWindow=Ti.UI.createWindow({backgroundColor: 'yellow'});varwhiteWindow=Ti.UI.createWindow({backgroundColor: 'white'});varredWindow=Ti.UI.createWindow({backgroundColor: 'red'});// Tabs creationvartab1=Ti.UI.createTab({title: 'Giallo',window: yellowWindow});vartab2=Ti.UI.createTab({title: 'Bianco',window: whiteWindow});vartab3=Ti.UI.createTab({title: 'Rosso',window: redWindow});// TabGroup creationvartabGroup=Ti.UI.createTabGroup({tabs: [tab1,tab2,tab3]});// Adding event to the button in order to open the TabGroupbutton.addEventListener('click',function(){// Open the TabGroup in NavigationWindownavWindow.openWindow(tabGroup);});// Open the NavigationWindownavWindow.open();
Steps to reproduce
Start the app and press the button
Platform
iOS
SDK version you are using
12.3.0
Alloy version you are using
No response
The text was updated successfully, but these errors were encountered:
I have searched and made sure there are no existing issues for the issue I am filing
Description
When trying to open a TabGroup withing a NavigationWindow the app will crash with
In this PR d334ac9
some code was removed in
iphone/Classes/TiUITabGroupProxy.m
to fix iOS animations issues. When adding that back it won't crash.Expected Behavior
show the TabGroup inside the NavigationWindow
Actual behavior
Crash
Reproducible sample
Steps to reproduce
Start the app and press the button
Platform
iOS
SDK version you are using
12.3.0
Alloy version you are using
No response
The text was updated successfully, but these errors were encountered: