Category is used to define additional methods to an existing class. Yes, even you don’t have its source code and even without subclassing it.
You can add methods, but not properties (possible in a non-conventional way, will save it for some other day.)
Three powerful features
- Can be used to split up class interface & implementation into several files to achieve MODULARITY in large projects.
- Definition iteself.
- Provide an effective way to achieve psuedo-private methods in Objective C.
Declaration & Implementaion :
That’s one question, see you tomorrow. If you ❤️ this article please give it a clap👏 and support my work. Also, smash that Follow icon 🟢 to get posts delivered to you on your couch. We are in this together 😇. Cheers!