基类未被识别

时间:2013-07-16 11:59:57

标签: objective-c macos automatic-ref-counting

我刚刚将MASPreferences添加到我的项目中。它是一个小型库,可帮助创建首选项窗口。因为它只是一个类和.xib我只是将它们添加到我的主目标。当我尝试使用它们时,我得到的错误基本上意味着找不到类(当我想要子类化它,或者分配一个实例时我会得到错误)。任何想法,为什么我可能会失踪?

将.m文件和.xib添加到目标 .h文件位于页眉搜索路径(../Libraries/**)中的文件夹中 由于它不是ARC类,我将-fno-objc-arc标志添加到.m文件中 .h文件当然是在我使用的地方导入的。

这些是错误:

_pref = [[MASPreferencesWindowController alloc] initWithViewControllers:ctrls
                                                                  title:title];
// Use of undeclared identifier 'MASPreferencesWindowController'.

@interface SBPreferencesWindowController : MASPreferencesWindowController
// Class 'SBPreferencesWindowController' defined without specifying a base class

在两种情况下都会导入MASPreferencesWindowController.h。

0 个答案:

没有答案