I have a \"Utility\" class that implements the AVAudioPlayerDelegate protocol.
This is my Utility.h
@i
When you don't need an instance of a Class, just manually get ride of the warning:
audioPlayer.delegate = (id)self;
On the other hand, please note that if you need a Delegate, it means you should have an instance of a Class as a good coding practice instead of a static Class. It can be made a singleton easily:
static id _sharedInstance = nil;
+(instancetype)sharedInstance
{
static dispatch_once_t p;
dispatch_once(&p, ^{
_sharedInstance = [[self alloc] init];
});
return _sharedInstance;
}