imaginary-cloud / CameraManager

Simple Swift class to provide all the configurations you need to create custom camera view in your app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Landscape Left and Right Orientation Issue

tikamsingh opened this issue · comments

Please help to support orientation perfectlly. I am getting issue in orientations

I can see same issue.

@daliborristic883 How to solve the issue?

Same here the preview layer is halved and the view rotates.

Any solution?

I am facing same issue but found the solution after so many days.
The main issue of the orientation is in the CameraManager.swift file (Custom or cocoapod file), and you have to do changes in this file.
If you are using cocoapod of the CameraManager then you have to unlock this file to do changes.
Here is the solution of the landscape left and landscape right orientation issue :

In CameraManager.swift file, there is one function named "_videoOrientation", you will see switch case of deviceOrientation and in
case .landscapeLeft: it will return .landscapeRight and also
case .landscapeRight: it will return .landscapeLeft

So, the issue is here, you need to do below changes in those cases, and the changes are :
case .landscapeLeft:
return .landscapeLeft
case .landscapeRight:
return .landscapeRight

after you done with changes, you will check the orientation issue is fixed.

Guys, hope you will get the solution from this. 👍
Happy coding.. 😊