播放系统声音

NSString *path = [NSString stringWithFormat:@"/System/Library/Audio/UISounds/photoShutter.caf"];

NSURL *audioPath=[NSURL URLWithString:path];

SystemSoundID soundId;

AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &soundId);

AudioServicesPlayAlertSound(soundId);

你可能感兴趣的:(Path)