I'm working on a homer soundboard type app but I keep getting an error in xcode.
This code is for playing audio when a button is pushed.
Here's my code thats under the mainview.m.
Anyideas?
This code is for playing audio when a button is pushed.
Here's my code thats under the mainview.m.
Code:
#import "MainView.h"
#import <AVFoundation/AVAudioPlayer.h>
@implementation MainView
- (IBAction)pushButton {
NSString *path = [[NSBundle mainBundle] pathForResource:@"Stupid" ofType:@"mp3"];
AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
theAudio.delegate = self;
"WARNING: class 'MainView' does not implement the 'AVAudioPlayerDelegate' protocol"
[theAudio play];
}
@end
Anyideas?