Skip to content

Instantly share code, notes, and snippets.

@darknoon
Created February 9, 2011 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darknoon/818141 to your computer and use it in GitHub Desktop.
Save darknoon/818141 to your computer and use it in GitHub Desktop.
@interface A : NSObject
- (void)doSomething;
@end
@implementation A
- (void)doSomething;
{
//Implementation
}
@end
@interface B : A
@end
@implementation B
//May or may not contain an implementation of -doSomething
@end
/*
* The question is: at runtime, how can I determine whether or not B gets its implementation of -doSomething from the superclass A or implements it itself.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment