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

[BUG] lockCameraInPortraitOrientation breaks app orientation configuration #89

Open
2 tasks done
tiendq opened this issue Feb 14, 2025 · 1 comment
Open
2 tasks done
Assignees
Labels

Comments

@tiendq
Copy link

tiendq commented Feb 14, 2025

Prerequisites

  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected Behavior

App orientation configuration should work e.g. app only allows Portrait orientation should never rotate.

Current Behavior

App orientation works correctly (Portrait app never rotate) until you open camera, then after that app will rotate and no longer locked to portrait as configured.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Allow only Portrait orientation in app configuration
  2. Build and run app
  3. Open camera and close it (rotate your phone to make if necessary)
  4. Rotate your phone and app is no longer locked in portrait orientation

Code Sample

Same as https://github.com/Mijick/Camera/wiki/Configuring-MCamera#blocking-camera-rotation

Even I set portrait in this line static var orientationLock = UIInterfaceOrientationMask.portrait

Screenshots

If applicable, add screenshots to help explain your problem.

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Name Version
SDK e.g. 3.0.1
Xcode e.g. 16.2
Operating System e.g. iOS 17.7
Device e.g. iPhone 11
@tiendq
Copy link
Author

tiendq commented Feb 15, 2025

I just read the code and fixed the issue, please take a look at my PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants