次のコードを使用して、シミュレーターでビデオを選択しています。
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) // for ipad only
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.allowsEditing = NO;
imagePicker.videoQuality = UIImagePickerControllerQualityTypeHigh;
imagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeMovie, nil];;
popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
[popover presentPopoverFromBarButtonItem:[self.navigationItem.rightBarButtonItems objectAtIndex:0] permittedArrowDirections: UIPopoverArrowDirectionAny animated:YES];
}
ビデオを選択して「使用」ボタンをクリックするまでは問題ありません。この時点で、「圧縮中のビデオ」インジケータが表示され、シミュレータがロックされ、再起動する必要があります。デリゲートが呼び出されることはなく、デバッガーは「実行中」と表示されるだけで、戻ることはありません。
私の質問は、(a)
コードに明らかに問題があるかどうか、および
(b)UIImagePickerControllerとシミュレーターに関するいくつかの投稿に気付いた(ただし、私のようなものはありません)シミュレーターにバグがあるかどうかを誰かが知っているかどうかです。これを引き起こします。これは 6.1 シミュレーターです。