I am using Xcode to create a Mac OSX, Objective-C, cocoa app. I want my app to play a custom sound after a certain time.
This is what my code looks like:
- (IBAction)clickToPlayCustomSoundButtonClicked {
[self performSelector:@selector(playCustomSound) withObject:nil afterDelay:1.0];
}
- (void)playCustomSound {
***This is where I want to put the code to play the custom sound***
}
What code should I put in my (void)playCustomSound method to play a custom sound?
Please help and thanks guys 😀
Try this (assuming your sound-file is in your Ressources folder):