0
다음 코드에서 오류는 발생하지 않지만 여전히 오디오를 재생하지 않습니다.
내가 뭘 잘못하고 있니?클릭 버튼에서 오디오가 재생되지 않음
-(IBAction)buttonPressed:(id)sender
{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"ABC"
message: @" ABC"
delegate: self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK",nil];
[alert show];
AVAudioPlayer *audioplayer;
NSString *audiopath = [[NSBundle mainBundle] pathForResource:@ "1Abhi Kuch Dino Se.mp3" ofType:@ "mp3"];
NSURL *audioURL = [NSURL fileURLWithPath:audiopath];
audioplayer = [[AVAudioPlayer alloc]initWithContentsOfURL:audioURL error:nil];
[audioplayer play];
}