最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

[已解决]swift代码出错:Cannot find protocol declaration for ‘NSObject’

iOS crifan 1131浏览 0评论

代码:

@protocol GesturePasswordDelegate <NSObject>

– (void)forget;

– (void)change;

@end

出错:

GesturePasswordView.h:9:36: Cannot find protocol declaration for ‘NSObject’

如图:

Cannot find protocol declaration for ‘NSObject’

ios – cannot find protocol declaration for NSObject – Stack Overflow

objective c – "Cannot find interface declaration for NSObject"? – Stack Overflow

iphone – Cannot find protocol declaration NSObject – Stack Overflow

加上导入foundation:

#import <Foundation/Foundation.h>

@protocol GesturePasswordDelegate <NSObject>

– (void)forget;

– (void)change;

@end

即可。

转载请注明:在路上 » [已解决]swift代码出错:Cannot find protocol declaration for ‘NSObject’

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
59 queries in 0.097 seconds, using 18.81MB memory