January 2012
Beginner
655 pages
16h 35m
English
If you observe the content of the SomeClass.h file, you will notice that at the top of the file is an #import statement:
#import <Foundation/Foundation.h>
@interface SomeClass : NSObject {
}
@end
The #import statement is known as a preprocessor directive. In C and C++, you use the #include preprocessor directive to include a file's content with the current source. In Objective-C, you use the #import statement to do the same, except that the compiler ensures that the file is included at most only once. To import a header file from one of the frameworks, you specify the header filename using angle brackets (<>) in the #import statement. To import a header file from within your project, you use the “ and ” characters, as in the case of the SomeClass.m file:
#import “SomeClass.h”
@implementation SomeClass
@end