Thread 1: signal SIGABRT

Hello, when I try to run my project, i get the error Thread 1: signal SIGABRT

on this piece of code:

let destinationVC = segue.destination as! ViewController

the highlighted error word is as!, and there are no other errors or warnings in that file. What do I do?

Generally, you would see some more info in the debug console when you get Thread 1: signal SIGABRT. Better check it again.

But when you get it on the line let destinationVC = segue.destination as! ViewController, the most suspicious thing is segue.destination being non-ViewController.

Have you checked which segue is invoked and what is set in the Custom Class of the target view controller?

Thread 1: signal SIGABRT
 
 
Q