预计类型错误(Expected a type error)

2019-09-16 23:53发布

所以我创造了这个方法:

- (void)addToViewController:(SecViewController *)controller 
      didFinishEnteringItem:(NSString *)item;` <br>

Xcode不断给我Expected a type ,在SecViewController错误*。 这意味着什么? SecViewController不是一个类型?

Answer 1:

您必须声明SecViewController

@class SecViewController;

......在你的头的顶部。

注意:不要只是#import所有采用的标题。 这只是恶化你的头的依赖关系。



文章来源: Expected a type error