On 6 Mar 2014, at 15:34, Mike Abdullah <mabdul...@karelia.com> wrote:

> 
> On 6 Mar 2014, at 15:30, William Squires <wsqui...@satx.rr.com> wrote:
> 
>> Can an ObjC protocol be inherited by another protocol? I know the syntax for 
>> regular (class) inheritance, and for specifying that a class implements a 
>> protocol, but what's the syntax (if there is one) for one protocol 
>> inheriting from another?
> 
> Much the same as declaring the same for a class. e.g. this is quite common:
> 
> @protocol MyProtocol <NSObject>
> …
> @end
> 
I was wondering recently if it is possible to derive a protocol from an 
interface declaration?

I have been using NSObject -forwardingTargetForSelector to implement Obj-C 
style multiple inheiritance.
In this case it is useful to have a protocol for the forwarding target that the 
base class can inherit.
In most cases though only an interface will be available.

May be that my approach is wanting here.

Jonathan 














_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to