一、用于测试的自定义类
@interface CustomedObj:NSObject
+ (instancetype) methodInit;
@end
@implementation CustomedObj
+ (instancetype)methodInit {
CustomedObj *temp = [[CustomedObj alloc] init];
return temp;
}
- (void) print {
NSLog(@"==== Customed Object print");
}
- (void)dealloc {
NSLog(@"对象即将被析构");
}
@end@interface CustomedObj:NS