I’m trying to make a category adopt a protocol, and I’m having a problem with what seems like a simple thing.
The interface declaration is:
@interface UIView (UIViewCategory) <DesiredProtocol>
And I was assuming the implementation declaration should be the same:
@implementation UIView (UIViewCategory) <DesiredProtocol>
But this gets a yellow warning in XCode, with the message: “Protocol qualifiers without ‘id’ is archaic”.
So should the declaration be:
@implementation UIView (UIViewCategory) id<DesiredProtocol>
??
I can’t find reference for this specific issue. Much thanks for all replies.
You don’t need the protocol list on an @implementation block, whether it’s a category or not.