[super xxx] calls the super method on the current instance (i.e. self).
[super xxx] ,表示接收xxx消息的对象是self,但是xxx方法的实现是super的。
http://stackoverflow.com/questions/11827720/why-does-self-class-super-class
一个网上很有名的面试题:下面的代码输出结果是什么?
@implementation Son : Father
- (id)init
{
self = [super init];
if (self)
{
NSLog(@"%@", NSStringFromClass([self class]));
NSLog(@"%@", NSStringFromClass([super class]));
}
return self;
}
@end
// 答:都是son。