0
UIView 애니메이션으로 사운드를 재생하는 간단한 게임 응용 프로그램을 개발하고 있습니다.응용 프로그램에서 사운드를 재생하는 데 문제가 있습니까?
theAudioPlayer = [[AVAudioPlayer alloc] init];
[theAudioPlayer initWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"pageTurn"] ofType:@"mp3"]] error:NULL];
[theAudioPlayer play];
여기서 theAudioPlayer는 AVAudioPlayer 클래스의 인스턴스 객체입니다. 이제 내 문제는 UIViews 사운드가 음소거로 바뀌는 10-15 분 후에 게임을 할 때입니다. 다시는 재생할 수없는 이유는 무엇입니까?
내 질문을 보내 주셔서 감사합니다.
감사합니다. 나는 당신의 방법을 시도 할 것입니다. – Tirth