"property with 'retain(or strong)' attribute must be of object type" in the mutually included header files
. The
solution Very simple:
add
@class "xxxx" to the relevant header file
to solve it.
For example:
#import <Foundation/Foundation.h> #import "Project.h" #import "Member.h" @class Member; @class Project; @interface Day : NSObject{ ... } @end
The difference from C++ is that when this problem occurs, we don't need to delete the #import "xxx" header file where the problem occurs.