1

I would like to have the "Next" button perform segue to move to "PersonalInformation" (a UIViewController)

But I get a "signal SIGABRT" with the code.. How can I fix it?

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)
JAL
  • 41,701
  • 23
  • 172
  • 300
chiefpika
  • 427
  • 1
  • 4
  • 13
  • 1
    Where is the SIGABRT occurring? In `performSegueWithIdentifier` or somewhere else? – JAL Feb 24 '16 at 15:05

1 Answers1

1

This is mainly caused by wrong storyboard or xib/nib connections, make sure that you have the right connections in storyboard that have the next button or the one you are moving to.

DeyaEldeen
  • 10,847
  • 10
  • 42
  • 75