【发布时间】:2016-05-17 17:55:07
【问题描述】:
鉴于下面的代码,当我单击“接受”按钮时,它不会导航到SecondViewController,它只显示黑屏。任何帮助表示赞赏。
let alertController = UIAlertController(title: tit!, message: "Book Now!", preferredStyle: .Alert)
let declineAction = UIAlertAction(title: "Decline", style: .Cancel, handler: nil)
alertController.addAction(declineAction)
let acceptAction = UIAlertAction(title: "Accept", style: .Default) { (_) -> Void in
let nv=SecondViewController()
self.presentViewController(nv, animated:true, completion:nil)
}
presentViewController(alertController, animated: true, completion: nil)
alertController.addAction(acceptAction)
【问题讨论】: