[solved] Checklist: tableView in addItem()


`func addItemViewController(controller: AddItemViewController, didFinishAddingItem item: ChecklistItem) {

    let newRowIndex = items.count
    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()?

OK. It seems that the variables are public variables from the controller classes.

Correct, these variables come from the view controller.