I'm trying to add a category to AVAudioPlayer but I keep getting the error "Cannot find interface declaration for 'AVAudioPlayer'".
AVAudioPlayer+Fade.h
#import <AVFoundation/AVFoundation.h>
@interface AVAudioPlayer (Fade)
- (void)fadeToVolume:(CGFloat)volume;
@end
AVAudioPlayer+Fade.m
@implementation AVAudioPlayer (Fade)
- (void)fadeToVolume:(CGFloat)volume
{
}
@end
I'm using an AVAudioPlayer in my MainMenuViewController
class, so I added:
#import <AVFoundation/AVFoundation.h>
to MainMenuViewController.h
and I added:
#import "AVAudioPlayer+Fade.h"
to MainMenuViewController.m
.
The AVFoundation is added to the project. I can use the AVAudioPlayer perfectly without the Fade category. When I add the Fade category, I get that error. Any ideas?