iOS/Xcode异常:no visible @interface for XXX declares the selector YYY
2014-07-08 15:00
921 查看
在iOS/Xcode开发过程中,出现如下异常信息:
no visible @interface for XXX declares the selector YYY
分析原因:
There are lots of reasons it could happen, but generally it’s saying that at the line of code it flags, it doesn’t see any evidence that the selector you are referencing is in the interface of the type it thinks the object has.
有很多原因导致这一情况发生,但是一般而言,发生异常的代码行,指没有在interface接口文件中,找到任何你引用的selector(方法)。有可能是没有在interface进行声明定义,也有可能是字母输入错误。 没有在.h文件中申明方法
Local
declaration of 'XXX'
hides instance
variable遇到这种原因,是因为本地变量跟函数参数变量同名。
1.在targets->build phases中修改compilerFlags属性,添加:-fobjc-arc,就可以让旧的工程支持arc;
2.在targets->build phases中修改compilerFlags属性,添加:-fno-objc-arc,就可以让原来支持arc的工程不使用arc,对于大部分第三方类库来说都可以顺利编译通过
相关文章推荐
- ARC Semantic issue:No visiable @interface for xxx declares the selector yyy 与arc semantic issue
- ARC Semantic issue:No visiable @interface for xxx declares the selector yyy编译错误
- iOS error no visible @interface for '***' declares the selector '***
- IOS 编译错误,iOS compile error: no visible @interface for 'CDVCommandDelegateImpl' declares the selector
- iOS error: No visible @interface for 'xxxx' declares the selector 'alloc'
- No visible @interface for "MobilePhone" declares the selector "takePhoto"
- Xcode报错: no visible @interface for XXX declares…
- Xcode no visible @interface for XXX declares
- [iOS]Xcode no visible @interface for XXX declares…
- Xcode no visible @interface for XXX declares…
- no visible @interface for declares
- dom4j The prefix “xxx” for element "xxx:yyy" is not bound
- wireshark在mac上使用时到遇到:no interface can be used for capturing in this system with the current configur
- wireshark:no interface can be used for capturing in this system with the current configuration
- No configuration found for the specified action: 'xxx/xxx.action' in namespace: ''. Form action def
- eclipse git 一个错误:the current branch is not configured for pull No value for key branch.xxx.merge found
- 【转载】wireshark:no interface can be used for capturing in this system with the current configuration
- There is no getter for property named 'xxx' in 'class com.xuezhixin.mls.web.model.yyy
- [WARNING] The POM for XXX-system:jar:1.9.0-SNAPSHOT is missing, no dependency information available
- eclipse git 报错:the current branch is not configured for pull No value for key branch.xxx.merge found