property with 'retain(or strong)' attribute must be of object type”
这个错误。
解决方式很简单:
在相关的头文件中加入
@class "xxxx"
就能解决。
如:
#import <Foundation/Foundation.h> #import "Project.h" #import "Member.h" @class Member; @class Project; @interface Day : NSObject{ ... } @end
跟C++不一样的地方是,出现这个问题时,我们不需要删除发生问题的#import “xxx”这个头文件。