【发布时间】:2019-03-09 02:12:45
【问题描述】:
您好,我想使用 uiviewController 上的按钮选择带有一些数据的标签栏项目,我可以使用此按钮移动到另一个标签栏,但在此方法中我无法移动数据
let second = self.tabBarController?.viewControllers?[2] as? MyAccountViewController
second?.testValue = "Test Value"
self.tabBarController?.selectedIndex = 2
崩溃报告
无法将 'UINavigationController' (0x2496e5280) 类型的值转换为 'xxxxxx.MyAccountViewController' (0x1016cd4c8)。 2019-03-09 08:07:34.281652+0500 xxxxx[390:17926] 无法转换类型的值 'UINavigationController' (0x2496e5280) 到 'xxxxxx.MyAccountViewController' (0x1016cd4c8)。
【问题讨论】:
标签: ios swift uitabbarcontroller uitabbar