Super class
That is, the parent class can call the superclass method through [Super SetName: @ "a"]
Composite
Refers to an object that consists of several other objects
Object initialization
@interface*engine;)@end@implementation Car-(ID) init{ if(self =new]; } return//init@end
To get the superclass to complete the desired one-time initialization, you need to invoke [Super Init]. Assigning the result of [super Init] to self is the standard practice of OC. Prevents the superclass from returning objects that are not the same as the objects originally created during initialization.
#import
1, import the system header file with <>, import the project local header file with ""
2, A.M. implementation need to #import "A.H"
3, @interface, A.M. can use @class Engine to tell the compiler will know what this is, implementation still need #import. #import会告诉编译器类的详细信息, and @class will only tell you that this is a class. The #import loop-dependent reference will be an error, and @class will not, a reference b,b reference a. You cannot use @class to reference a superclass in a subclass, because the compiler does not yet know the superclass information.
OBJECTIVE-C Study Notes