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];

posted @ 2015-05-25 15:18  罕见  阅读(135)  评论(0编辑  收藏  举报