First, [super respondsToSelector:@selector(draggingSession:movedToPoint:)]
is the same as [self respondsToSelector:@selector(draggingSession:movedToPoint:)]
. super
allows you to invoke the superclass implementation of the given method; in this case, respondsToSelector:
. But if your class (or whatever class this object is) does not override -respondsToSelector:
(99.9% of classes will not need to override -respondsToSelector:
), then the superclass implementation is the same as the implementation of the class of self
. Basically, in both cases, you are checking to see if the current object (self
) responds to the selector.
So, what you're seeing is this: self
responds to the selector, but the superclass of the class this is in does not have an implementation for the selector. What does that mean? Either the current class, or somewhere between the current class as the class of self
, this method is implemented. That's why self
responds to it. But there is no superclass implementation.