The correct syntax to refer to an object that conforms to the CallBack
protocol is id<CallBack>
.
Thus, you might want:
@protocol CallBack <NSObject>
-(void)method;
@end
@interface Test : NSObject
-(void)callback:(id <CallBack>)theCallback;
@end
and
@implementation Test
-(void)callback:(id <CallBack>)theCallback
{
[theCallback method];
}
@end
For more information, see Working with Protocols in the Programming with Objective-C guide.