我收到了這個神祕的信息:wait_fences:未能收到回覆:10004003 我用Google搜索了一下,有人認爲這與沒有正確解僱UITextField或Alert有關。我有我的應用程序中的一個文本框,我向你保證,我使用resignFirstResponder,等等正確釋放它。 當我從子視圖打開MPMusicPickerController時,我收到此消息,這是否有任何區別。我真的需要解決這個問題,因爲它搞亂了我的整個應用程序!wait_fences:未能收到回覆:10004003?
感謝, 布拉德
EDIT1:
- (IBAction)openMediaPicker:(id)sender {
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeAny];
mediaPicker.delegate = self;
mediaPicker.allowsPickingMultipleItems = YES;
mediaPicker.prompt = @"Select songs to play";
[self presentModalViewController:mediaPicker animated:YES];
[mediaPicker release];
}
// Media picker delegate methods
- (void)mediaPicker: (MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection {
AppAppDelegate *appDelegate = (AppAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.tr2 stop];
[playstopButton setHidden:NO];
[playstopButton setImage:[UIImage imageNamed:@"Stop-Music-Button.png"] forState:UIControlStateNormal];
// We need to dismiss the picker
[self dismissModalViewControllerAnimated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
// Assign the selected item(s) to the music player and start playback.
[self.musicPlayer stop];
[self.musicPlayer setQueueWithItemCollection:mediaItemCollection];
[self.musicPlayer play];
}
- (void)mediaPickerDidCancel:(MPMediaPickerController *)mediaPicker {
// User did not select anything
// We need to dismiss the picker
[self dismissModalViewControllerAnimated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
}
它崩潰了你的應用程序? – Daniel
@丹尼爾沒有它沒有崩潰的應用程序,但它只是不執行我需要它的方法很可能是因爲這個問題。 –
也許顯示什麼不工作,我們可能能夠更容易地識別你的問題 – Daniel