-1

我的 ipod 中有视频,但图像选择器说没有视频,如果有人可以破解它,我会很感激

UIImagePickerController *videopicker = [[UIImagePickerController alloc]init];
videopicker.delegate = self;
videopicker.mediaTypes =
[[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
videopicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:videopicker animated:YES];
videopicker.wantsFullScreenLayout = YES;
4

1 回答 1

0

下面的代码对我来说工作正常,它显示了照片和视频

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) {

            UIImagePickerController *apicker = [[UIImagePickerController alloc] init];
            apicker.delegate = self;
            apicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
            **apicker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeSavedPhotosAlbum];**
            [self presentModalViewController:apicker animated:YES];
        }
    }
于 2012-11-29T20:25:33.537 回答