1

anybody know how to show UIImagePickerControllerSourceTypePhotoLibrary in landscape mode just like the photo app in iPhone ?

- (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];
    }
}
Desmond
  • 5,001
  • 14
  • 56
  • 115
  • 3
    Check the answer to [this question][1]. [1]: http://stackoverflow.com/questions/2083672/uiimagepickercontroller-in-landscape – Michael Frederick Apr 20 '12 at 04:24
  • Hi Michael, it doesn't work for me, No visible @interface for 'UIDevice' declares the selector 'setOrientation:' when i set [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; – Desmond May 15 '12 at 10:56

1 Answers1

2

can't show it in landscape form. though the native photo.app can

Desmond
  • 5,001
  • 14
  • 56
  • 115