Xcode Version 7.2.1 (7C1002) pch文件使用

pch文件是什么就不多说了,这几说怎么配置。

1、新建pch文件,起名。

2、配置

把/Users/jdkc/Desktop 换成$(SRCROOT)

4、pch里写的东西

#ifndef PrefixHeader_pch

#define PrefixHeader_pch

#ifdef __OBJC__

在这里面写东西!!!!!!!!

#endif

更新----------

设置路径时,showinfinder里找到pch文件,把pch文件拖到路径中,只保留pch及其上一级路径即可。

  

#endif /* PrefixHeader_pch */

原文地址:https://www.cnblogs.com/sunflower-lhb/p/5210295.html