简体   繁体   English

为什么XCode吓坏了? 也就是说,Xcode表示方法和属性不存在,但它们确实存在!

[英]Why is XCode freaking out?? I.e., Xcode says methods & properties do not exist but they do!

XCode has been acting really, really strange recently. XCode最近表现得非常非常奇怪。 It is telling me that various classes' methods and properties do not exist - but they do! 告诉我各种类的方法和属性不存在-但它们确实存在! This is happening both with a custom class, and a Core Data class. 自定义类和Core Data类都在发生这种情况。 I have declared all of the methods and properties, including all the necessary @synthesize calls, and have predeclared the classes using @class in the files which use them and included the .h files, but when I try to access the methods & properties - it throws errors or warnings, along the lines "No '+newMatrix' method found", "'Collection' may not respond to '+newMatrix'", and "Request for member 'isLanguage' in something not a structure or a union." 我已经声明了所有方法和属性,包括所有必需的@synthesize调用,并在使用它们并包含.h文件的文件中使用@class进行了预声明,但是当我尝试访问方法和属性时-它会沿着“未找到'+ newMatrix'方法”,“'Collection'可能不响应'+ newMatrix'”和“在结构或联合体中请求成员'isLanguage'的行引发错误或警告。 ” These have all be declared properly - what could be causing XCode to choke? 这些都已正确声明-是什么导致XCode阻塞?

Check whether they are in the list of files being compiled. 检查它们是否在要编译的文件列表中。 You might not have added the files. 您可能尚未添加文件。

For Core data did you include the Framework? 对于核心数据,您是否包括框架?

Make sure you're using the right import statements - these two are very different: 确保使用正确的import语句-这两个是非常不同的:

#import <SDKLibrary.h>
#import "CustomClass.h"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM