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.
精彩评论