In my AddViewController, I have this code:
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
eventTextField.userInteractionEnabled=false
dateTextField.userInteractionEnabled=false
detailsTextField.userInteractionEnabled=false
eventTextField.text=eventData.objectForKey("eventtitle") as! String
dateTextField.text=eventData.objectForKey("eventdate") as! String
detailsTextField.text=eventData.objectForKey("eventdetails") as! String
}
But then when I run the app, this error comes up saying, "Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" on this line:
eventTextField.text=eventData.objectForKey("eventtitle") as! String
Then in the debug area, it says,
fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
Any way to debug this?