【发布时间】:2015-10-27 12:25:02
【问题描述】:
基本上我有一个 uialertaction 需要在按下时显示另一个视图控制器。起初我是这样做的,但现在即使我没有收到错误代码,应该打开的视图控制器也只是一个黑页。
if((user) != nil) {
let alert = UIAlertController(title: "Succesfull", message: "Logged In", preferredStyle: UIAlertControllerStyle.Alert)
self.presentViewController(alert, animated: true, completion: nil)
let delay = 2.0 * Double(NSEC_PER_SEC)
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(delay))
dispatch_after(time, dispatch_get_main_queue(), {
alert.dismissViewControllerAnimated(true, completion: { () -> Void in
let logInViewController = BoardViewController()
self.presentViewController(logInViewController, animated: true, completion: nil)
实际上几天前我遇到了这样的问题,但我无法正确理解答案。所以谁能解释我为什么会发生并且没有给出任何错误
【问题讨论】:
标签: ios swift uiviewcontroller uialertview uialertcontroller