Keeping headers as `project` in Xcode framework

夙愿已清 提交于 2020-01-06 02:23:31

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/1975907/keeping-headers-as-project-in-xcode-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!