#import< UIKit / UIKit.h>在pch减慢编译时间? [英] Does #import <UIKit/UIKit.h> on pch slow down the compile time?
本文介绍了#import< UIKit / UIKit.h>在pch减慢编译时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在阅读有关进口的帖子,我有一个问题。默认情况下,prefix.pch文件中的#import是否会减慢编译时间?我应该删除它并仅在必要时导入吗?
I was reading this post about imports and I had one question. Does the #import that comes in the prefix.pch file by default slow down the compile time? Should I remove it and import only when necessary?
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
推荐答案
不。它实际上提高了编译速度。
No. It actually improves the compilation speed.
这是一个很好的教程,实际上清除了使用#import语句和.PCH文件的所有困惑。它还会详细告诉你iOS7中引入的一些新的模块。
This is a nice tutorial that actually clears all the confusion over use of #import statements and .PCH files. Also it tells you in detail about something new known as "modules", introduced in iOS7.
这篇关于#import< UIKit / UIKit.h>在pch减慢编译时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文