在.h文件中
#import <Foundation/Foundation.h>
@interface Demo : NSObject
@end
在.m文件中
#import "Demo.h"
@interface Demo()
@end
@implementation Demo
@end
1、写在.h文件中的@interface是公共的头文件,可以被任何类调用它的属性及其方法
2、写在.m文件中的@interface可以理解为私有的头文件,叫做是Class Extension(类扩展)