Explain the difference between 'protocol' and 'delegate'?
Answer / Mahfooz Alam
In Objective-C, a protocol defines a blueprint of methods that a class should implement to adhere to certain rules or behaviors. It is a way for multiple classes to communicate with each other by following a common interface. On the other hand, a delegate is an object that is appointed to handle specific events or tasks for another object. A delegate typically conforms to a protocol to define the methods it will implement.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is libdispatch?
What design patterns do you use in ios? : IOS Architect
What is difference between nsnotification and delegate?
Is it possible to write a program without using nib file
what is the difference between nonatomic & atomic ? which is thread safe and why
How to send crash report from device?
What is @synthesize?
What are moments and collections?
Explain the difference between frame and bounds?
What is gcd in ios swift?
What does ios stand for in texting?
What is difference between mvc and mvvm in ios?