tags:

views:

61

answers:

1

If you import UIKit.h does that also automatically import Foundation.h?

+2  A: 

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.

Dave DeLong
So what's the point of #including Foundation.h or UIKit.h in the .h files?
Phenom
@Phenom not much. :)
Dave DeLong