【发布时间】:2016-12-27 07:03:48
【问题描述】:
我正在尝试在用户成功创建帐户后启动 segue。我知道正在调用该函数,但未执行 segue。我尝试使用 presentViewController 作为替代方案,还尝试了 dispatch_async(dispatch_get_main_queue()) 方法。这是我认为应该可以工作的代码。
func showGoalViewController () {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("ID_SetGoalViewController") as! SetGoalViewController
self.presentViewController(vc, animated: false, completion: nil)
}
这是我试图在故事板中调用的 segue 的屏幕截图:
【问题讨论】:
-
showGoalViewController()不工作? -
我相信这个问题是指
navigateToMainAppScreen()不起作用。 -
这个
LoginViewController是从包含“ShowSetGoal”segue 的情节提要中实例化的吗? -
在情节提要中,您需要将
LoginViewController与NavigationController嵌入 -
我也认为这是因为 segue.kind ,尝试不同的东西或使用 NavigationController
标签: ios swift storyboard segue