范文 |
1.新建xx.pch 2.在Build Settings 中 Prefix Header 中添加xx.pch 3.在xx.pch添加需要的.h文件或者其他声明 例如; #import <ReactiveCocoa/RACEXTKeyPathCoding.h> #import <ReactiveCocoa/RACEXTScope.h> #import <ReactiveCocoa/ReactiveCocoa.h> - -!有个坑。。。 .pch的位置问题:右键xx.pch Show File Insepector,查看右侧Full Path。根据路径修改Build Settings 中 Prefix Header 中的xx.pch路径。 例如:我在ReactiveCocoa_Test 内创建,我的.pch文件位于/Users/Guicai/Documents/Demo/ReactiveCocoa_Test/ReactiveCocoa_Test/ReactiveCocoa_Test.pch 那么我就在Build Settings 中 Prefix Header 填写 ${SRCROOT}/ReactiveCocoa_Test/ReactiveCocoa_Test.pch |