Methods in super that will be subclassed anyway (Cocoa)
Posted
by Michael Matheus
on Stack Overflow
See other posts from Stack Overflow
or by Michael Matheus
Published on 2010-04-05T09:01:55Z
Indexed on
2010/04/05
9:13 UTC
Read the original article
Hit count: 337
Sorry if this is a repost but I couldn't quite search for it because I can't explain it in a few words. I have a super class with lots of methods but they will always (not all of them) be subclassed. From the super I need to access (read only) those methods. I could either leave the methods in super empty or I could just not type them in super but call them anyway like so [self myMethod]
and it will call my subclassed method even if it doesn't exist in super. This works but Xcode gives me an error though. 'superclass' may not respond to '-subclassmethod'
What should I do?
© Stack Overflow or respective owner