Xcode6中添加pch

1,Command+N,打开新建文件窗口:ios->other->PCH file,创建一个pch文件:“工程名-Prefix.pch”:

2,将building setting中的precompile header选项的路径添加“$(SRCROOT)/项目名称/pch文件名”(例如:$(SRCROOT)/LotteryFive/LotteryFive-Prefix.pch)

可以了,编译一下程序,如果有错误检查一下添加的路径是否正确。

3,将Precompile Prefix Header为YES,预编译后的pch文件会被缓存起来,可以提高编译速度

posted on 2015-06-09 15:00  coderJin  阅读(123)  评论(0编辑  收藏  举报

导航