Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

picturechooser always show in portrait orientation #761

Closed
LuoyeAn opened this issue Aug 4, 2014 · 13 comments
Closed

picturechooser always show in portrait orientation #761

LuoyeAn opened this issue Aug 4, 2014 · 13 comments
Labels
t/bug Bug type

Comments

@LuoyeAn
Copy link

LuoyeAn commented Aug 4, 2014

In my ipad project , i use the picturechooser to select an image. my app ui orientation is landscape,but picturechooser always show in portrait orientation can the picturechooser open by the landscape orientation way?

@Cheesebaron
Copy link
Member

Most likely not as it is launching external apps.

@LuoyeAn
Copy link
Author

LuoyeAn commented Aug 4, 2014

Sorry, I don't understand. Can you be more details?

@jzhouw
Copy link

jzhouw commented Aug 5, 2014

Below content comes from Apple's UIImagePickerController doc, is this plugin missing to use a Popover with UIImagePickerController for ipad app?

https://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/doc/uid/TP40007070-CH3-DontLinkElementID_1

"On iPad, the correct way to present an image picker depends on its source type, as summarized in this table:

Camera Photo Library Saved Photos Album
Use full screen Must use a popover Must use a popover

The table indicates that on iPad, if you specify a source type of UIImagePickerControllerSourceTypePhotoLibrary or UIImagePickerControllerSourceTypeSavedPhotosAlbum, you must present the image picker using a popover controller, as described in “Presenting and Dismissing the Popover” in UIPopoverController Class Reference. If you attempt to present an image picker modally (full-screen) for choosing among saved pictures and movies, the system raises an exception.
On iPad, if you specify a source type of UIImagePickerControllerSourceTypeCamera, you can present the image picker modally (full-screen) or by using a popover. However, Apple recommends that you present the camera interface only full-screen."

@martijn00 martijn00 added the t/bug Bug type label Jan 25, 2015
@PenaPP
Copy link

PenaPP commented May 5, 2015

I have a landscape iOS application for iPad and when I try to use the ChoosePictureFromLibrary method it always crashes with the following exception...

Objective-C exception thrown.
Name: UIApplicationInvalidInterfaceOrientation
Reason: Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES

I guess it is related to the jamesatgithub's comment about popovers and modality :(

@PenaPP
Copy link

PenaPP commented May 5, 2015

Confirmed... it has to be in popover to work in landscape mode ;)

@martijn00
Copy link
Contributor

@PenaPP Can you make a PR to fix this?

@PenaPP
Copy link

PenaPP commented Aug 10, 2015

@martijn00 I guess I don't have any. I solved that by changing my code ;)

@Jerome2606
Copy link

Hello,
Picture chooser is for me one very important feature when we speak about mobile.
I'm very happy with mvvmcross to separate the logic of the ui and make my application unit testing ready and share a lot of code.
But I'm very disappointing about this bug that blocks me for 3 days before getting on this thread that we should be in portrait mode and not landscape or be in a "popover". I doesn't understand what does it mean.

Is anybody is able to take time to explain me what code is needed to fix this issue or fix the bug inside of the plugin plz ???

Thank you

@Cheesebaron
Copy link
Member

Cheesebaron commented Apr 6, 2017

@Jerome2606 Is this on iPad or what? Popovers are only necessary on iPad, and we currently don't have a way of passing along one of those to present the UIImagePickerController.

One thing that puzzles me is how you can be stuck with this for 3 days, when you always had the possibility of showing your own UIImagePickerController ¯\(ツ)

@Jerome2606
Copy link

Yes it is for ipad.

What I mean for 3 days is that I'm starting with Xamarin and iOS development and was not able to know why suddenly my app was crashing. It took me a while to find these ways to get crash info:
https://www.utest.com/articles/get-ios-logs-on-windows-using-the-command-line
https://support.hockeyapp.net/kb/client-integration-ios-mac-os-x-tvos/how-to-manually-upload-and-symbolicate-a-crash

After that I get the error and this guides me to this thread.
it is again difficult for me to understand all the things into iOS Xamarin and MvvmCross framework.

So basically the solution we start to implement is like you said implement our own UIImagePickerController but at this point I'm not able to understand how to implement "popover" to make it working in landscape so for now we force user to use portrait and that should be only a "workaround".

I would like to get some existing code like @PenaPP did on his side.

@Cheesebaron
Copy link
Member

@Jerome2606
Copy link

Thank you, I take a look on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Bug type
Development

No branches or pull requests

6 participants