我想让“下一步”按钮执行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)发布于 2016-02-24 15:04:57
这主要是由错误的故事板或xib/nib连接造成的,请确保您在故事板中有正确的连接,其中有next按钮或要移动的按钮。
https://stackoverflow.com/questions/35605623
复制相似问题