In Objective-C I can create categories to extend a class. I can also add properties to them as they are basically only methods. However I cannot bind them with @synthesize or any other way I know. Therefore whenever I try to use them the app would crash.
Is there any use of properties in categories or are they just possible because it would break the logic of the language to forbid them. Could you give me a scenario where defining a property in a category would make sense?
The main use of defining property in category is in creating class extension, with the help of category when we create class extension then there we can define property and synthesise them as well.This is the way to achieve hiding of property for public access.
You can check this for more information – http://www.techpaa.com/2012/04/adding-properties-to-categories-and.html