iOS AVAudioPlayer 提示音

NSString *urlPath = [[NSBundle mainBundle] pathForResource:@"" ofType:@""];

NSURL *url = [NSURL fileURLWithPath:urlPath];

self.player = [[AVAudioPlayer alloc]initWithContentsOfURL:url error:nil];

self.player.volume = 5;

self.player.numberOfLoops = 0;

[self.player play];

你可能感兴趣的:(play)