I just noticed that when I create iPhone application using standard templates in Xcode (View Based Application, Window based application etc) the header files only import UIKit.h (and not Foundation.h). So if the Foundation.h file is not imported, how can one use Foundation classes like NSString, NSArray etc in the program ? Shouldn’t it be throwing an error?
I just noticed that when I create iPhone application using standard templates in Xcode
Share
It is imported in the precompiled header file (extension
.pch) in your project.As to why
UIKit.happears to have two import lines per file since it also shows up above, though, I’m not too sure. It shouldn’t matter anyway, as the second#importline won’t cause UIKit to be included again if it’s already included in the precompiled header file.