Let's say I have a protocol, call it Protocol A
. I want every class implementing A to have a method that has a return value of itself.
For example, class Implementor
should have a method called "GetAnother" with a return value of Implementor.
Is this possible to force a class to do with Protocols? Because as far as I can see, you have to create methods with specific return values.
I don't want to return an id
because I want people to be able to depend on the return value being a certain class.
Thanks!