dom
July 3, 2016, 2:46pm
1
class AllListsTableViewController: UITableViewController,ListDetailViewControllerDelegate { }
feel confused for a long time , i can’t fix this bug T~T
protocol ListDetailViewControllerDelegate : class { func listDetailViewControllerDidCancel(controller:ListDetailViewController) func listDetailViewController(controller: ListDetailViewController,didFinishAddingItem checklist: Checklist) func listDetailViewController(controller: ListDetailViewController,didFinishEditingItem checklist: Checklist) }
What is the error message?
dom
July 4, 2016, 7:43am
4
/Users/End/Desktop/Checklists/Checklists/AllListsTableViewController.swift:11:7: Type ‘AllListsTableViewController’ does not conform to protocol ‘ListDetailViewControllerDelegate’
Did you add those methods to AllListsTableViewController? Make sure they are spelled exactly the same!
dom
July 4, 2016, 12:21pm
6
Oh God, thanks , i find it
Hello,
I receive exactly the same error message. Can’t get my head around it, checked the code 10 times for typos.
This is the declaration in my AllListsViewController.swift file:
class AllListsViewController: UITableViewController, ListDetailViewControllerDelegate {
And this is the protocol section from my ListDetailViewController.swift file:
protocol ListDetailViewControllerDelegate: class {
func listDetailViewControllerDidCancel(
_ controller: ListDetailViewController)
func listDetailViewController(
_ controller: ListDetailViewController,
didFinishAdding checklist: Checklist)
func listDetailViewController(
_ controller: ListDetailViewController,
didFinishEditing checklist: Checklist)
}
As far as I can tell, the code is identical to that of the PDF book, and I believe I hooked up all the screen elements correctly. What are the possible causes of this error?
Kind regards,
Philip
Solved IT! Was a typo after all in one of the functions further down in the code.