1:創(chuàng)建新文件 ios->other->PCH file,創(chuàng)建一個pch文件:“工程名-Prefix.pch”:
2:將building setting中的precompile header選項(xiàng)的路徑添加“$(SRCROOT)/項(xiàng)目名稱/pch文件名”(例如:$(SRCROOT)/LotteryFive/LotteryFive-Prefix.pch)
3:將Precompile Prefix Header為YES,預(yù)編譯后的pch文件會被緩存起來,可以提高編譯速度