I'm using MulticastDelegate class which is part of xmpp framework and taken here It works perfect for me! However I got warning:
'MulticastDelegate' may not respond to 'someMethod'
Is there any way to avoid the warning for this class? Thanks in advance.
What kind of someMethod is that? Did you include the MulticastDelegate.h header?
Update: Aha, in that case you need to tell the compiler that the delegate implements the Notifier interface:
#import "MulticastDelegate.h"
@protocol Notifier
- (void) someMethod;
@end
@interface Manager
{
MulticastDelegate <Notifier> delegate;
}
@end
This should do. But isn’t the code a bit fishy? How do you know that the delegate implements someMethod when delegate is a plain MulticastDelegate? Are you omitting something in the example?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With