I am new to Objective C. having spent couple of months in iOS, I am struggling to understand usage of Objective C categories.
Are they same as C# partial classes and used to divide huge classes in to methods pertaining to a piece of requirement.
OR there is more to it than just this much ?
Objective-C categories are a way to add methods to existing classes. They can be compared to .NET extension methods.
The Apple documentation is pretty comprehensive about categories, so I suggest you to read it to fully understand the benefits.
Note: One advantage of categories over extension methods, is that you can add both instance and static methods to a class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With