iOS项目添加.pch文件 / How to add a .pch file to an iOS project

1.Create a .pch file.

2.Write your macro, headfiles or something. Here is my prefixHeader.pch

3.Choose the Project and select "Build Settings"

   >>> find with keywords "prefix"

   >>>make the "Precompile Prefix Header" is "yes".

4.Tell Xcode where have you put your .pch file.

   Select "Prefix Header", Double click the content

   and write "$(SRCROOT)/magicNote/prefixHeader.pch"

             or "$(PROJECT_DIR)/your Project name/your prefix file name.pch" as below. 

 

 5.Done.Save and run.

 

posted @ 2017-08-27 14:05  搞机工程师  阅读(179)  评论(0)    收藏  举报