What is an extension?
Answer / Krati Vishnoi
In Objective-C, an extension is a way of adding methods and properties to existing classes without modifying the original implementation files. Extensions help you separate your code into smaller parts, making it more readable and manageable. To create an extension, simply place the additional code inside a curly brace block following the @interface declaration for the class in a .m or .h file.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between a script and function?
When would you use nsarray and nsmutablearray?
What is difference between c and objective c?
What does the gc () method?
Distinguish between @synthesize and @dynamic in objective –c?
What is objective c?
What is the difference between atomic and nonatomic synthesized properties?
Explain what is #import?
Is a fact objective?
What is block in objective c?
What is data encapsulation in objective-c?
Why do we require class extension?