ios - including common header files in .pch file -


I'm just thinking, is it usually good to include header files used in .pch file Is practice? Most files required below the headers like

  #import & lt; UIKit / UIKit.h & gt; #import & lt; Foundation / Foundation. H & gt;   

So each file should be instead, is it a good practice to add those PP files?

.pch file

  #ifdef __OBJC__ #import & lt; UIKit / UIKit.h & gt; #import & lt; Foundation / Foundation. H & gt; # Import & Lieutenant; Mostly u sd h & gt; #endif   

I got some damage to it, 1) Dependency is hidden I 2) Source files can not be copied directly.

If you give some information on this, then it will be great.

Thanks

Yes you can do this.

Even this time reduces compilation. Remove

In general, the newly-generated iOS projects that come with this functionality, called Preekanpld header or prefix header, and a file Whose extension is .pp.

You will compile all the headers you want and the encoded it before it becomes something else before, and use it to compile other compilation units in your project (eg. Files).

A precompiled header time compilation may or may not increase; In general, this time reduces compilation, as long as you have a lot of general headers and / or source files.

However, it is not necessary to treat any such pre-compiled headers large dumping ground, because your collection units can make the underlying dependencies on goods of all kinds when you implement loose coupling between components Want to do

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -