Difference between Category and Class Extension?


Sachinkumaram

1.category

-> In objective c, when you want to add some more functionality to a class without inheritance, you simply use category for it.
-> it come with its own .h and .m file
-> Category use to add new method not properties.

2.class extension

-> In objective c, when you want to make behaviour of some property private you use class extension.
->its come with .h file only.
->mainly for properties.

View original post

Advertisements