【发布时间】:2019-05-26 11:28:36
【问题描述】:
我需要有关错误修复的帮助。我使用 segue 在 ViewControllers 之间传输。
我有一个UITabBarController 和一个UIViewController。当我单击我的 vc 中的按钮时,我移至第二个 vc。我的第二个 vc 没有 TabBar。 (使用segue)。在我的第二个 vc 中,我有按钮和 UIAlertController。当我单击按钮或警报时,我必须使用 TabBar 转换到第一个 vc,但我的 TabBar 不显示。如何解决这个问题?我don't 需要使用NavigationController。
let alert = UIAlertController(title: "Поздравляю", message: "Тренировка окончена", preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: "Click", style: UIAlertAction.Style.default, handler: { action in self.performSegue(withIdentifier: "backSegue", sender: self) }))
self.present(alert, animated: true, completion: nil)
【问题讨论】:
-
你能把你的按钮动作代码放在你要转移到第二个VC的地方吗?如果可能的话还有故事板 UI 截图?
-
@VRAwesome 按钮我不使用代码。 segue -> 显示
标签: swift segue uistoryboardsegue