2012-04-20 8 views
1

誰もがiPhoneの写真アプリのように風景モードでUIImagePickerControllerSourceTypePhotoLibraryを表示する方法を知っていますか?UIImagePickerControllerSourceTypePhotoLibraryをランドスケープモードで表示する方法

- (void)getPhotoFromSource:(UIImagePickerControllerSourceType)sourceType; 
{ 
    if ([UIImagePickerController isSourceTypeAvailable:sourceType]) 
    { photoPicker.sourceType = sourceType;//UIImagePickerControllerSourceTypePhotoLibrary 
     [self presentViewController:photoPicker animated:YES completion:nil]; 
     //[self presentModalViewController:photoPicker animated:YES]; 
    } 
    else 
    { 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error accessing media" message:@"Device doesn't support media source" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil, nil]; 
     [alert show]; 
    } 
} 
+3

[この質問] [1]への回答を確認してください。 [1]:http://stackoverflow.com/questions/2083672/uiimagepickercontroller-in-landscape –

+0

こんにちはマイケル、 はそれは私のために動作しません、 'UIDevice' の目に見える@interfaceを宣言していませんセレクタ 'setOrientation:' 私は[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]を設定します。 – Desmond

答えて

2

は、ランドスケープ形式では表示できません。ネイティブのphoto.appは可能ですが

関連する問題