I keep on getting the “Expected Method Body” error when i try to run my app on Xcode. The bolded place is the place where I got the error. HELP!!! One More thing, I keep on getting a error saying “incomplete implementation” on the “@implementation SoundnoardFirstViewController” part. HELP!! thanks
#import "SoundnoardFirstViewController.h"
@interface SoundnoardFirstViewController ()
@end
@implementation SoundnoardFirstViewController
-(IBAction)PlaySound1:(id)sender1
**-(IBAction)PlaySound2:(id)sender2**
-(IBAction)PlaySound3:(id)sender3
-(IBAction)PlaySound4:(id)sender4
-(IBAction)PlaySound5:(id)sender5
-(IBAction)PlaySound6:(id)sender6
(IBAction)PlaySound1:(id)sender1:(id)sender {
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"This is the name of the clip", CFSTR ("sound file type"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
}
-(IBAction)PlaySound2:(id)sender2:(id)sender{
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"DoYouHave?", CFSTR ("mp3"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
}
-(IBAction)PlaySound3:(id)sender3:(id)sender {
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"Hello", CFSTR ("mp3"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
}
-(IBAction)PlaySound4:(id)sender4:(id)sender {
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"SoupBetter?", CFSTR ("mp3"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
}
declare the private methods inside the
SoundnoardFirstViewController ()Example: