在Xcode框架中将头文件保存为`project` [英] Keeping headers as `project` in Xcode framework
问题描述
我正在制作一个Xcode框架,并且我有一个公共标题可以访问一堆项目标题。但是当我在另一个项目中导入框架时,它会抛出错误,无法找到项目的头文件。我从公共头中的项目标题引用了对象。在公共头文件中,如何保留这些头文件项目,但仍然使用它们中的对象?
@class来包含其他接口并在实现文件(.m)中使用#import。
使用@class通知编译器所指示的类存在,但编译器不会需要它的实现。
I'm making an Xcode framework, and I have one public header which accesses a bunch of project headers. But when I import the framework in another project, it throws errors that it can't find the header files that are project. I have referenced objects from the project headers in the public header. How do I keep those headers project but still use the objects from them in the public header?
In the public header file use @class to include other interfaces and use #import in the implementation file (.m).
Using @class informs the compiler that the indicated class exists but the compiler will not require it's implementation.
这篇关于在Xcode框架中将头文件保存为`project`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!