What do you mean by category and when to use it?
Answer / Shalini Gupta
In Objective-C, a category is a way to add new methods or properties to an existing class without modifying its original source code. This is useful when you want to extend the functionality of an existing class without affecting its original implementation. For example, you can create a category for UIView and add custom drawing methods to it.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is dealloc?
Is reference counting garbage collection?
How to call function in objective-c?
What are the three main types of property?
Who calls dealloc method? Can we implement dealloc in arc? If yes, what is the need to do that?
What is method swizzling in objective c and why would you use it?
Is objective c faster than swift?
What is a category extension?
How to implement in app purchase in ios objective c?
How do you write an objective summary?
What are objective c properties?
Is objective c type safe language?