类的延展:只为有源代码的类, 扩充功能(实例变量, 方法), 延展中的实例变量和方法是本类私有的, 只能在本类中使用.
Extension文件的创建方法和 Category 的 创建方法相同
在左侧导航栏中生成一个文件
Student_SayHi.h
#import "Student.h"
@interface Student ()
@property (nonatomic) NSInteger age;//年龄
//打招呼
- (void)sayHi;
@end
方法的实现还是在 Student.m 文件中实现的