Require help with a protocol issue when changing view controller names

I am working on the checklist tutorial PDF around page 120. I have just changed the addItemViewController to its new name and now have an issue with the ChecklistView Controller. The message is: ‘ChecklistViewController’ does not conform to protocol ‘itemDetailViewController’. I have looked all through the script and compared it to yours as well as made sure the custom class on the storyboard says itemDetailViewController. What am I missing?

@seanec Thanks very much for posting your question. Whenever you get such an error, it means that your class that is trying to conform to the protocol that you declared, isn’t doing so exactly. Compare the method signature in your protocol declaration, and the method signature in the class where you implement the function. The “error” can very well be something as subtle as a difference in spelling, difference in capitalization, or even variable types inside the method signature. I find the easiest way to correct this error is to simply copy the full method signature from the protocol declaration, and paste it where you are implementing the function inside your class. Trust me when I say this, but this error happens to even the most senior developers!

Double check, and see what you find!

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