disusered / cordova-open

Open audio, video, images and more with applications installed on the user's device
MIT License
54 stars 55 forks source link

orientation is not restricted: in iOS changing orientation to landscape cuts off app #27

Open simpixelated opened 9 years ago

simpixelated commented 9 years ago

I have an iOS app that is restricted to portrait orientation only, but the file viewer that's opened using this plugin does allow rotation to landscape. If I close the file while in landscape, the bottom half of the screen is black and it looks like the app is trying to take up the space of landscape, but is not rotated to fit. It can be reset by opening another file, rotating to landscape, then back to portrait and closing the file.

img_0004

I don't know if this helps, but I saw there was a similar bug in the Codova InAppBrowser plugin that was fixed: https://issues.apache.org/jira/browse/CB-5649

disusered commented 9 years ago

Thanks for the report, and the related bug. I should have time at the end of this week to look at it, I will update this issue with my progress.

dakiva commented 9 years ago

For the issue above, I forked and hacked a solution that forces portrait mode. Pasting it below as potential reference. The subclassing of QLPreviewController is likely sane, and you could influence the return value based on configuration.

https://github.com/disusered/cordova-open/compare/master...homdna:master

disusered commented 9 years ago

Thank you for the reference and help! I agree with making it configurable, I will take your suggestions very much into account!