【发布时间】:2016-02-24 15:00:45
【问题描述】:
我想让“Next”按钮执行 segue 以移动到“PersonalInformation”(一个 UIViewController)
但是我得到一个带有代码的“信号 SIGABRT”.. 我该如何解决?
let alert = UIAlertController(title:"Confirmation", message: confirmationMessage, preferredStyle: UIAlertControllerStyle.Alert)
let confirmBtn : UIAlertAction = UIAlertAction(title: "Next", style: UIAlertActionStyle.Default, handler: {(action:UIAlertAction!)-> Void in
self.performSegueWithIdentifier("PersonalInformation", sender: self)
})
let cancelBtn : UIAlertAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil)
alert.addAction(cancelBtn)
alert.addAction(confirmBtn)
self.presentViewController(alert, animated: true, completion: nil)
【问题讨论】:
-
SIGABRT 发生在哪里?在
performSegueWithIdentifier或其他地方?
标签: ios swift segue uialertcontroller uialertaction