I have created my own classes Category.h and Category.m. Category class is inheriting NSObject. In my project there is only one class named Category.
At following line, it's showing me this error.
@interface Category : NSObject
Any help would be greatly appreciated. Thanks!
If you check the documentation there's Category type which is:
typedef struct objc_category *Category;
You are getting this error because Category
is defined as a pointer to struct objc_category
.
If you want to avoid these kind of errors I suggest you adding your own prefix to all the classes you make in the project. Either from your name:
or from project name:
Also double-checking with documentation is always good. It's very rare that you'll hit existing class, but possible.
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