クラスのヘッダー ファイルのインポートとクラスの継承の違いは何ですか?
Person.h:
#import <Foundation/Foundation.h>
@interface Person:NSObject
{float fromPerson;}
-(void)inPerson;
@end
ケース 1 - Employee.h に Person.h をインポートする
#import "Person.h"
@interface Employee:NSObject
{float fromEmployee;}
-(void)inEmployee;
@end
ケース 2 - Person.h を Employee.h に継承する
#import <Foundation/Foundation.h>
#import "Person.h"
@interface Employee:Person
{float fromInheritedEmployee;}
-(void)inInheritedEmployee;
@end