一、简单的音效实现
// -1.创建URL NSURL *url = [[NSBundle mainBundle] URLForResource:@"buyao.wav" withExtension:nil]; // 0.创建音效ID SystemSoundID soundID; AudioServicesCreateSystemSoundID((__bridge CFURLRef)(url), &soundID); // 1.播放音效(本地音效) #warning ios8的模拟器不支持播放音效(真机可以) AudioServicesPlaySystemSound(soundID);