说明
我正在处理本机应用程序,当我运行本机ios应用程序时抛出异常。对于导航,我使用了react-native-navigation软件包,软件包链接:: https://www.npmjs.com/package/react-native-navigation。
错误::
导航中不允许使用异常'UINavigationControllers 在目标上调用setRoot时引发了控制器' 带有参数的RNNBridgeModule ...
查看此屏幕截图::
在我调用此函数时发生此错误:
export const setRootWithSideBar = (componentId, screen) => {
isInitial = false;
screenId = screen;
currentStackId = componentId;
Navigation.setRoot({
root: {
sideMenu: {
id: MAIN_MENU,
left: {
component: {
id: MAIN_MENU,
name: MAIN_MENU
}
},
center: {
stack: {
id: 'Main',
children: [
{
stack: {
id: componentId,
children: [
{
component: {
id: screen,
name: screen,
options: sidebarOptions(screen)
}
}
]
}
}
]
}
}
}
}
});
}
我的环境信息::