第一种解决方案:
When you declared your class, you probably forgot the superclass in the @interface line.
For example, you did
@interface MyClass
{
// ... ivars ...
}
// ... methods ...
@end
You want that first line to be:
@interface MyClass : NSObject
or whatever superclass you intended to use.或者就是继承的类没有include
第二种
本文介绍了在使用Objective-C编程时,如何正确地声明一个类及其超类。文章提供了两种常见错误示例,一种是在声明类时遗漏了超类声明,另一种是没有包含所继承的类文件。通过修正这些错误,开发者可以确保类的正确继承。
1512

被折叠的 条评论
为什么被折叠?



