ارفع راسك فوق انته سوري حر ... :green_heart::green_heart:

Skip to content
Snippets Groups Projects
Commit 48c0099f authored by George's avatar George
Browse files

fixes in camera for previewer

parent b1ee6654
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -35,8 +35,6 @@ final class DocumentPreviewViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
pdfView.accessibilityIdentifier = "pdfView"
navigationItem.title = file?.displayName
pdfView.setDocument(file?.pdfDocument)
......
......@@ -119,6 +119,12 @@ public final class ScannerViewController: UIViewController {
return flashButton
}()
lazy private var cancelBarButton: UIBarButtonItem = {
let cancelBarButton = UIBarButtonItem(title: "Cancel", style: .done, target: self, action: #selector(cancelTapped))
cancelBarButton.tintColor = .white
return cancelBarButton
}()
lazy private var activityIndicator: UIActivityIndicatorView = {
let activityIndicator = UIActivityIndicatorView(style: .gray)
activityIndicator.hidesWhenStopped = true
......@@ -228,7 +234,11 @@ public final class ScannerViewController: UIViewController {
}
private func setupNavigationBar() {
if isAddedToPDF {
navigationItem.setLeftBarButtonItems([cancelBarButton, flashButton], animated: false)
} else {
navigationItem.setLeftBarButton(flashButton, animated: false)
}
navigationItem.setRightBarButton(autoScanButton, animated: false)
if UIImagePickerController.isFlashAvailable(for: .rear) == false {
......@@ -424,6 +434,10 @@ public final class ScannerViewController: UIViewController {
}
}
@objc private func cancelTapped() {
self.navigationController?.popViewController(animated: true)
}
@objc private func cancelImageScannerController() {
self.navigationController?.popViewController(animated: true)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment