2nd Swift Program tutorial (Checklists)

I am getting error at the end of the tutorial while following the edit cell (didfinshediting) topic. The error is as below. can some one help on this:

@ramki You should delete the open curly brace in the line of code you use to create a new index path for the table view row you currently edit. This is how the correct version of the AddItemViewControllerDelegate protocol function should actually look like after all:

func addItemViewController(_ controller: AddItemViewController,                                             didFinishEditing item: ChecklistItem) {
  if let index = items.index(of: item) {
    let indexPath = IndexPath(row: index, section: 0)
    if let cell = tableView.cellForRow(at: indexPath) {
      configureText(for: cell, with: item)
    }
  }
  navigationController?.popViewController(animated:true)
}

Please let me know if you have any other questions or issues regarding the whole thing when you get a chance. Thank you! :]

thanks a lot. It works now.

This topic was automatically closed after 166 days. New replies are no longer allowed.