How do you define a protocol?
Answer / Manoj Kumar Tiwari
"To define a protocol in Objective-C, you use the `@protocol` directive. Here's an example of defining a simple protocol:n```n@protocol MyProtocoln// Optional methods and properties go heren@endn```
| Is This Answer Correct ? | 0 Yes | 0 No |
Can objective c run on windows?
When will you use nsarray and nsmutablearray?
What are some of the major differences between objective c and swift?
When might you use a cfarray/dictionary instead of a nsarray/dictionary?
What is the use of category in objective-c?
Who calls dealloc method?
What is the difference between string and nsstring?
What is delegation protocol?
What is the main difference between function calls and messages?
What is the principle distinction between the function calls and messages?
What is class extension? Why do we require them?
What is a delegate? Can you retain delegates?