Hello.
`func addItemViewController(controller: AddItemViewController, didFinishAddingItem item: ChecklistItem) {
let newRowIndex = items.count
items.append(item)
let indexPath = NSIndexPath(forRow: newRowIndex, inSection: 0)
let indexPaths = [indexPath]
tableView.insertRowsAtIndexPaths(indexPaths, withRowAnimation: .Automatic)
dismissViewControllerAnimated(true, completion: nil)
}
Where does variable “tableView” come from? It has never been declared.
override func viewDidLoad() { super.viewDidLoad() if let item = itemToEdit { title = "Edit Item" textField.text = item.text } }
Why can I use “title” which was not declared? Is “title” the variable in super.viewDidLoad()?