Xcode7如果还想用pch文件的话需要自己手动添加了,方法如下:
1.点击File—>New—>File(或者快捷键command+N)
在iOS—>Other目录下选择PCH File
2.给PCH文件命名,最好是 项目名-Prefix.pch
如建立工程名为test,则pch文件名为test-Prefix.pch
3.在targets中的Build Setting中搜索prefix,找到Apple Llvm 7.0 - Language
4.将Precompile Prefix Header改成YES;
5.点击Prefix Header,在空白输入处直接将 项目名-Prefix.pch文件拖入进来,获得pch文件的全路径,致此,pch文件就可以正常使用了;