Hi,
I'd like to suggest you to give the developer an option to not show all the library comments, at some point it's starts to be annoying and the prints that I wort just swallowed into the library's prints.
The second thing is to add support for orientation changes, on portrait everything looks good, but on landscape the camera is not rotating and things not looks very good.
I'v actually added some support by myself, but I'm sure you can do it better because you build this library.
Here is what I added/changed:
CameraViewController.swift
public var videoOrientation: AVCaptureVideoOrientation = .portrait
open override func viewDidLoad() {
super.viewDidLoad()
...
previewLayer.connection?.videoOrientation = videoOrientation
...
}
open override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
...
previewLayer?.connection?.videoOrientation = videoOrientation
}
ScannerController.swift
func checkOrientation() -> AVCaptureVideoOrientation{
switch UIDevice.current.orientation {
case .landscapeLeft:
return .landscapeRight
case .portrait:
return .portrait
case .portraitUpsideDown:
return .portraitUpsideDown
case .landscapeRight:
return .landscapeLeft
default:
return .portrait
}
}
override func viewDidLoad() {
...
videoOrientation = checkOrientation()
...
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
videoOrientation = checkOrientation()
}
Thanks,
Ido.
Hi,
I'd like to suggest you to give the developer an option to not show all the library comments, at some point it's starts to be annoying and the prints that I wort just swallowed into the library's prints.
The second thing is to add support for orientation changes, on portrait everything looks good, but on landscape the camera is not rotating and things not looks very good.
I'v actually added some support by myself, but I'm sure you can do it better because you build this library.
Here is what I added/changed:
Thanks,
Ido.