开发者

UIKit.h and Foundation.h in Objective-C

If you import UIKit.h does that also automatically import开发者_运维百科 Foundation.h?


UIKit.h doesn't explicitly include it, but I wouldn't be surprised if one of the other UIKit headers does.

However, all of your files will have it anyway, because your default pch (precompiled header, or the header that's automatically added to every file in your project) comes with this:

#ifdef __OBJC__
    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
#endif

This means that every file in your iPhone app will automatically have Foundation and UIKit imported.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜