I'm working on a Udemy course for iOS 8 - Swift language. And I keep getting this error when trying to make a To Do List App:
fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
Here is the code:
Here is the code below:
class SecondViewController: UIViewController {
var toDoItems:[String] = []
@IBOutlet var toDoItem: UITextField!
@IBAction func addItem(sender: AnyObject) {
toDoItems.append(toDoItem.text)
println(toDoItems)
}
Any help?
Thanks!!
toDoItem
? – Midhun MP