Description
So I decided to fire up my app once more, after doing a clean and reinstall, and found that I was getting a crash that would send me to a "Thread 1: signal SIGABRT" at the top of the AppDelegate.swift file. The error occurred when I was simply navigating through views, via buttons that show(push) on to the stack. I even tried commenting out the functions on the view that I was trying to reach, in order to insure that it wasn't a function throwing an error for some reason. Below, I will attach some code snippets connected with the view I am trying to reach and the view that I am currently on. Sorry if this seems vague. It is just a very vague issue I am running into.
Code
class back4: UIViewController, UITextFieldDelegate{
@IBOutlet weak var no: UIButton!
@IBOutlet weak var yes: UIButton!
@IBOutlet weak var distance: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
/*
@IBAction func save(_ sender: AnyObject) {
let appDel:AppDelegate = (UIApplication.shared().delegate as! AppDelegate)
let context:NSManagedObjectContext = appDel.managedObjectContext
let entity1 = NSEntityDescription.insertNewObject(forEntityName: "CrawlerOne", into:context) as NSManagedObject as! CrawlerOne
entity1.crawlerDistance = distance.text
}
@IBAction func yes(_ sender: AnyObject) {
let appDel:AppDelegate = (UIApplication.shared().delegate as! AppDelegate)
let context:NSManagedObjectContext = appDel.managedObjectContext
let entity1 = NSEntityDescription.insertNewObject(forEntityName: "CrawlerOne", into:context) as NSManagedObject as! CrawlerOne
entity1.crawlerAbrasion = "yes"
}
@IBAction func no(_ sender: AnyObject) {
let appDel:AppDelegate = (UIApplication.shared().delegate as! AppDelegate)
let context:NSManagedObjectContext = appDel.managedObjectContext
let entity1 = NSEntityDescription.insertNewObject(forEntityName: "CrawlerOne", into:context) as NSManagedObject as! CrawlerOne
entity1.crawlerAbrasion = "no"
}
*/
@IBAction func back(_ sender: AnyObject) {
if let navController = self.navigationController {
navController.popViewController(animated: true)
}
}
}
^ This is the code for the view that I am trying to reach, via a show segue connected to a button*
class back3: UIViewController, UITextFieldDelegate{ override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } @IBAction func back(_ sender: AnyObject) { if let navController = self.navigationController { navController.popViewController(animated: true) } } }
^ This is the code attached to the view I am currently at
Recap
Again, I don't get any error messages besides the "Thread 1: signal SIGABRT" at the top of AppDelegate.swift. I've also already checked for accidental multi-segue'd buttons, because I know I've accidentally done that in the past. I am using swift 3 and xcode 8.0
Debugger Console
2016-08-04 10:05:32.239 Prototype Inspection[9292:4560823] CUICatalog: Invalid asset name supplied
2016-08-04 10:05:32.241 Prototype Inspection[9292:4560823] Could not load the "" image referenced from a nib in the bundle with identifier "Wirtgen.Prototype-Inspection"
2016-08-04 10:05:33.732 Prototype Inspection[9292:4560823] CUICatalog: Invalid asset name supplied:
2016-08-04 10:05:33.733 Prototype Inspection[9292:4560823] Could not load the "" image referenced from a nib in the bundle with identifier "Wirtgen.Prototype-Inspection"
2016-08-04 10:05:34.609 Prototype Inspection[9292:4560823] CUICatalog: Invalid asset name supplied:
2016-08-04 10:05:34.610 Prototype Inspection[9292:4560823] Could not load the "" image referenced from a nib in the bundle with identifier "Wirtgen.Prototype-Inspection"
2016-08-04 10:05:35.981 Prototype Inspection[9292:4560823] Unknown class back4 in Interface Builder file.
2016-08-04 10:05:36.010 Prototype Inspection[9292:4560823] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key distance.'
*** First throw call stack:
(0x180a42db0 0x1800a7f80 0x180a42a70 0x18134f6e4 0x185f15de8 0x186078eb0 0x180966888 0x186077898 0x185f19230 0x185cde118 0x185ba08ec 0x185bb90d0 0x185d53e5c 0x185c5fe40 0x185c5fb1c 0x185c5fa84 0x185b9c1e4 0x18352e994 0x1835295d0 0x183529490 0x183528ac0 0x183528820 0x185b9eff4 0x1809f909c 0x1809f8b30 0x1809f6830 0x180920c50 0x182208088 0x185c0a088 0x1000ad4c8 0x1804be8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)