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

[image-picker] Allow modal to be displayed in landscape orientation #5946

Merged
merged 3 commits into from Oct 15, 2019

Conversation

lukmccall
Copy link
Contributor

Why

Resolve #2020.

How

I've changed the modal presentation style for ImagePicker modal. Sadly, I'm not sure if it what we want. For some reason, we put there UIModalPresentationOverFullScreen earlier.

On iOS 13 UIModalPresentationOverFullScreen matches to app's orientation. However, on earlier systems, it forces portrait orientation. Also, I've done some research and checked what was used in react-native-image-picker. They used UIModalPresentationCurrentContext (https://github.com/react-native-community/react-native-image-picker/blob/085d0b7d087f603bea530be2cb94cf3c1719f036/ios/ImagePickerManager.m#L185).

cc @tsapeta.

Test Plan

@bbarthec
Copy link
Contributor

Does your change affect behaviour on iOS prior version 13?

@lukmccall
Copy link
Contributor Author

Does your change affect behaviour on iOS prior version 13?

Yes, but only those applications which are using landscape orientation.

@tsapeta
Copy link
Member

tsapeta commented Oct 15, 2019

How does it work with the dev menu (the modal that we display when you shake the device)?
Also, take a look at the PR that changed it from UIModalPresentationCurrentContext to UIModalPresentationOverFullScreen: https://github.com/expo/universe/pull/2379

@lukmccall
Copy link
Contributor Author

How does it work with the dev menu (the modal that we display when you shake the device)?
Also, take a look at the PR that changed it from UIModalPresentationCurrentContext to UIModalPresentationOverFullScreen: expo/universe#2379

Dev menu displays and works properly.

@tsapeta tsapeta changed the title [image-picker] Fix landscape orientation [image-picker] Allow modal to be displayed in landscape orientation Oct 15, 2019
@lukmccall lukmccall force-pushed the @lukmccall/image-picker-fix-landscape-orientation branch from 512b2cd to db258b7 Compare October 15, 2019 14:00
@tsapeta tsapeta merged commit bcc947e into master Oct 15, 2019
@tsapeta tsapeta deleted the @lukmccall/image-picker-fix-landscape-orientation branch October 15, 2019 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImagePicker orientation iOS (portrait only)
3 participants