Person父类
PersonMe子类
[self setAge:age]; [super setName:yourName];
NSLog(@"self ' class is %@", [self class]);
NSLog(@"super' class is %@", [super class]);
结果;
self 's class is PersonMe super ' s class is PersonMe
请问,为什么方法能实现
打印的却是PersonMe呢?编译器就objc_msgSendSuper();然后就还是PersonMe?那方法怎么实现的?
|
|