The previous PCH for iOS was the system's own, and then Apple canceled the PCH, and I've been disgusted with the addition. I don't know if my brain is smoking recently. It was added. Do not like to add, because I want their code sent to others, other people can run anywhere, without changing the wrong warning.
Reflection of a bit, because a lot of people are added, online blog also have a variety of how to add, but there is no analysis of why plus, just give the method of adding. In particular, to do the procedures, we must know why to do so, can not be confused. Can be temporarily regardless, late must be tube. Because each step of the code is to represent the interest.
The benefits of PCH
1. Easy to re-add library
2. Header files
3. Public Documents
4. Name (name of the notice.
[Nsuserdefaults Standarduserdefaults] Key
Third-party key, and ID
)
4. Global variables. Color Font size, line, etc.)
Output of 5.log (Debug,release)
6. Macro (width of the screen, height of the navigation bar, these, etc.)
These are usually placed in the PCH header file.
Cons: 1. Since Apple has removed him. There must be something bad about him.
2. The efficiency of compiling is consumed. Every load must be loaded, it is sure to consume the efficiency of the operation, but very small, the general eye can hardly tell
3. Send to others, easy to find the address, each time you have to configure
4. In the header file, easy to confuse. Some pages use, do not know why can call this method, obviously did not declare themselves. But can be called. Easily misleading
5. Each time you create a new project, you have to manually add
6. There must be something else. That's when they meet.
This article is from the "snowflakes flying over the World" blog, please be sure to keep this source http://smengxiang.blog.51cto.com/11204872/1888172
IOS PCH Add-on