iOS Developer Question: Download iOS Developer PDF

What is difference between "protocol" and "delegate"?

Tweet Share WhatsApp

Answer:

protocol is used the declare a set of methods that a class that "adopts" (declares that it will use this protocol) will implement.
Delegates are a use of the language feature of protocols. The delegation design pattern is a way of designing your code to use protocols where necessary.

Download iOS Developer PDF Read All 102 iOS Developer Questions
Previous QuestionNext Question
What is difference between "assign" and "retain" keyword?What is block in objective c?