代码:
@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’