#import@interface EOCPerson : NSObject@property (nonatomic , copy , readonly) NSString *firstName;@property (nonatomic , copy , readonly) NSString *lastName;-(id)initWithFirstName:(NSString *)firstName lastName:(NSString *)lastName;@end//continuation n. 继续;续集;延长;附加部分/** * class-continuation * 唯一能声明实例变量的分类 * 此分类没有特定的实现文件,其中的方法都应该定义在类的主实现文件里 * 处理与C++混编时,隐藏C++文件 * 扩充属性,封装在类中的数据就由实例本身来控制,而外部代码则无法修改其值 * 视为私有的协议也应该写在class-continuation类里 */#import "EOCPerson.h"@interface EOCPerson ()// { NSString *_anInstanceVariable;}@property (nonatomic , copy , readwrite)NSString *firstName;@property (nonatomic , copy , readwrite)NSString *lastName;-(void)p_privateMethod;@end@implementation EOCPerson-(id)initWithFirstName:(NSString *)firstName lastName:(NSString *)lastName{ return nil;}-(void)p_privateMethod{ }@end