こんにちは、私はデバイスを横向きモードに設定しました。そのモードでは、「フォトギャラリー」ボタンを押している間、ギャラリーは縦向きモードで開き、ギャラリーから写真を選択すると横向きモードに戻ります。ランドスケープ モードで作業しているときに、ギャラリーをランドスケープ モードで開きたいです。
このコードを使用してフォトギャラリーを開きました
- (void)imagesFromGallery{
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
if(!popover)
{
popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
}
[popover presentPopoverFromRect:CGRectMake(500, 620, 0, 0)
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
}
else
{
[self presentModalViewController:imagePicker animated:YES];
} }
前もって感謝します....