arm1.ru

Tag: «precompiled headers»

A Useful Thing: Prefix.pch

event Jan 13, 2012 at 14:10

I discovered a useful thing in iOS development: the Prefix.pch file, a Precompiled Header.

From the description, Precompiled Headers are compiled, cached, and then automatically included into every file being compiled. So if there is some class that is needed everywhere or almost everywhere in a project, you can include that class inside the Prefix.pch file, which is created automatically in a new project, and it will be available everywhere. I really didn't like having to include the same class again and again in every View Controller when it was needed almost everywhere.