Xcode的#import比#include的好处是解决多重包含的问题,遇到了相互包含头文件的问题

property with 'retain(or strong)' attribute must be of object type”

解决方案就是在出错头文件中实现

@class 文件名;即可解决例如

#import "BaseViewModelService.h"

#import "NavigationImpl.h"

@class NavigationImpl;

@interface BaseViewModel : NSObject

@property(nonatomic,strong) NavigationImpl *naviImpl;

 

 

相关文章:

  • 2021-09-05
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
猜你喜欢
相关资源
相似解决方案