> On Aug 31, 2015, at 4:09 PM, Graham Cox <[email protected]> wrote:
>
> So the framework needs to arrange that if -foo:withBar: wasn’t overridden,
> but -foo: was, it should invoke the older override for backward compatibility
> until the client code is revised.
One way to do it is something like
@implementation BaseClass
...
if ([self methodForSelector: @selector(foo:)] != [BaseClass
instanceMethodForSelector: @selector(foo:)]) {
// self must be an instance of a subclass that’s overridden
-foo:.
}
—Jens
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]