在我的代码中:
- (void) viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
NSURL* musicFile = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"www/media/BlueZedEx" ofType:@"mp3"]];
AVAudioPlayer *click = [[AVAudioPlayer alloc] initWithContentsOfURL:musicFile error:nil];
NSLog(@"goldenace launchOptions = %@", musicFile);
click.delegate = self;
click.numberOfLoops = -1;
[click play];
}
但是当我在模拟器中运行我的应用程序时,没有任何音乐播放。请帮忙!