2011-03-22 5 views
0

다음 코드를 사용하여 사진 앨범에 액세스하려고합니다. 그것은 내 아이폰이나 iPad 4.0 버전 이하에서 잘 작동합니다.iPad : 사진 앨범에 액세스 할 때 오류가 발생합니다.

  • (공극) BrowsePhotoLibrary (ID) 송신기 {
NSArray *types = [UIImagePickerController availableMediaTypesForSourceType: 
    UIImagePickerControllerSourceTypePhotoLibrary]; 

if ([types containsObject:(id)kUTTypeMovie]) 
{ 

    UIImagePickerController *imgPickerController = [[[UIImagePickerController alloc] init] autorelease]; 
    imgPickerController.delegate = self; 
    imgPickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; 
    imgPickerController.mediaTypes = [NSArray arrayWithObject:(id)kUTTypeMovie]; 

    [self presentModalViewController:imgPickerController animated:YES];    
} 

}는

시오 2에서 동일한 부호가 충돌 4.3 버전이어야 하나가 있다면 사진 앨범에서 비디오를 사용할 수없는 경우 사진 앨범에 비디오가 없으면 동일한 코드가 사진 앨범으로 시작됩니다. 누군가 여기서 왜 그럴 수 있다고 조언 할 수 있습니까?

+0

imgPickerController.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum을 변경하여 문제를 해결했습니다. – Getsy

답변

0

imgPickerController.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum을 변경하여 수정했습니다.

관련 문제