Possible Duplicate:
What is a Protocol
hi,
how to use protocol in Objective-c ? what is the advantage of it .?
Thank and regards+
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Protocols have many advantages. The idea is to provide a way for classes to share the same method and property declarations without inheriting them from a common ancestor. This is especially useful in Objective-C when using the delegation pattern, on which the iOS and Mac OS SDKs rely heavily. There’s plenty of information out there on the subject, including a good overview in Apple’s developer documentation.