Creating an abstract class with a Protocol for child classes
Posted on 2012-04-13
I am new to Objective-C but I think I would like to create:
1) An Abstract class which performs certain functions needed by child classes, but should not be instantiated directly.
2) A Protocol that forces child object to conform to a standard interface
3) Child classes which inherit from this Abstract class and conform to the Protocol.
I understand that Objective-C will not let me enforce that a class is Abstract, but that's okay. I will name it with "Abstract" in the object name. I would like the child classes to be the highest level which conforms to the Protocol, otherwise I would need to make the Abstract class do so, then have empty methods to be overridden, and I am not even sure how to do this.
So please explain a different way to accomplish this or provide me the syntax to make this compile.
P.S. Is the "C" Topic Area the correct place to post questions for Objective-C?