My project has been increasing in size and I'm a little confused about where should I #import header files.
There are 3 main locations where I can import headers:
- The .pch file (prefix)
- The .h file (header)
- the .m file (implementation)
I don't care if the compiler takes more time to compile the files, all I care is that the end product is as fast as possible and uses the least amount of memory.
So, my questions are:
- If most files need a specific header, is it ok to add it to the .pch file, or is it more efficient to add it to just the required files?
- Should imports be done in the .h or .m file? I know I must add it to the .h file if i'm going to declare it there, but if I don't need to declare it in the .h file is there a problem of leaving the import there?