iPhone开发--警告Receiver 'ClassName' is a forward class and corresponding @interface may not exist
来源:互联网 发布:淘宝美工累成狗 编辑:程序博客网 时间:2024/06/05 04:08
今天上午重构代码的时候出现了如下的警告:
Receiver 'ClassName' is a forward class and corresponding @interface may not exist
查看代码,也并无错误啊,编译结果也正常,思考无果,只好求救网络,在stackoverflow上找到了答案:原因可能是你在.h文件中包含@classs yourclass.h,但是你并未在yourclass.m文件中包含#import "yourclass.h"
英文为:Maybe you have
@class UIPickerTable
in your .h file and you did not have #import UIPickerTable.h
on your {RootViewController}.m file呵呵,原因竟是我没包含头文件,呵呵,真是大意。编译器太“智能”了,直接编译成功,运行正常,但是提示的警告令人费解,有时我真希望编译器能准确提示错误在哪,而不是自动给我纠错,让我错的稀里糊涂。
摘录自:http://stackoverflow.com/questions/620661/receiver-classname-is-a-forward-class-and-corresponding-interface-may-not-exi
- iPhone开发--警告Receiver 'ClassName' is a forward class and corresponding @interface may not exist
- Receiver 'ClassName' for class message is a forward declaration
- receiver type "className" for instance message is a forward declaration
- interface may not exist
- Core Data:Receiver type ‘NSManagedObjectContext’ for class is a forward declaration
- Core Data:Receiver type ‘NSManagedObjectContext’ for class is a forward declaration
- Receiver XXX type for instance message is a forward declaration
- receiver type 'CALayer' for instance message is a forward declatation
- Receiver XXX type for instance message is a forward declaration
- Receiver type ‘X’ for instance message is a forward declaration
- Receiver type ‘X’ for instance message is a forward declaration
- Receiver XXX type for instance message is a forward declaration
- iOS开发--"performSelector may cause a leak because its selector is unknown"警告原因及其解决办法
- iOS开发-"performSelector may cause a leak because its selector is unknown"警告原因及其解决办法
- Attempting to load the view of a view controller while it is deallocating is not allowed and may res
- Attempting to load the view of a view controller while it is deallocating is not allowed and may res
- does not exist or is not a readable directory
- ..\TestApp does not exist or is not a readable directory
- ORACLE 多表关联 UPDATE 语句
- VBA 遍历是sheet
- window7下配置svn
- linux 管理小命令9—— 定时执行任务命令at和crontab
- emacs tips vim
- iPhone开发--警告Receiver 'ClassName' is a forward class and corresponding @interface may not exist
- 精通JAVA的25个标准
- 架构那点事系列三 - 由EAI到ESB
- Linq To SQL通用分页存储过程二个,支持多表联合.
- 标号Label的使用
- Row_Num()
- 正则替换字符串的全角、半角标点符号
- sys_connect_by_path
- Mac OS Evolution