Configure and use the Xcode 7 PCH file-learn to use macro definition,
What is the purpose of using macros?
In actual development, sometimes some settings need to be used repeatedly (for example, set the print information, configure the color, and configure the width). It is very troublesome to manually create each time. Although macros occupy memory, most developers are currently using them.
1. Create a PCH File
2. Open the configuration panel and follow the procedure
3. Find the relevant configurations.
4. Configure PrefixHeader. pch
A. the first method is to configure the absolute path. Only your computer can configure the path.
We do not recommend that you use this configuration. If the configuration path is changed except your computer, the configuration will become unavailable.
The result is as follows:
B. method 2 configure the relative path
Recommended: the system will automatically find the folder where the content below is configured.
5. Modify the Prefix Header to yes.
6. Configure OK. You can use it. Haha!
Try to configure the screen bounds macro.
Next time you adapt to the screen, simply print the above macro.
Which one is better?
I'm not saying .... Hey