게임을 개발했지만 지금은 여기에 음악을 추가하려고합니다. iPhone 3.5 Simulator에서 한 번 작동했지만 이제는 실행할 때마다 충돌합니다. 여기에 뭐가 있어요?
NSString *music = [[NSBundle mainBundle] pathForResource:@"Intro Soundtrack" ofType:@"mp3"];
audioPlayer1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:music] error:NULL];
audioPlayer1.delegate = self;
audioPlayer1.numberOfLoops = -1;
[audioPlayer1 play]; // Exception breakpoint says it is this line, but what's wrong here? I don't see anything wrong.
Thread 1 : Signal SIGABRT 오류가 발생합니다.
추가 연구에 따르면 코드에서 IBOutlets를 삭제했지만 IB의 연결은 제거하지 않았습니다. 나는 그것들을 제거하고 문제를 해결했습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다