Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion WeScan/Edit/EditScanViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ final class EditScanViewController: UIViewController {
lazy private var nextButton: UIBarButtonItem = {
let title = NSLocalizedString("wescan.edit.button.next", tableName: nil, bundle: Bundle(for: EditScanViewController.self), value: "Next", comment: "A generic next button")
let button = UIBarButtonItem(title: title, style: .plain, target: self, action: #selector(pushReviewController))
button.tintColor = .white
return button
}()

lazy private var cancelButton: UIBarButtonItem = {
let title = NSLocalizedString("wescan.edit.button.cancel", tableName: nil, bundle: Bundle(for: EditScanViewController.self), value: "Cancel", comment: "A generic cancel button")
let button = UIBarButtonItem(title: title, style: .plain, target: self, action: #selector(cancelButtonTapped))
button.tintColor = .white
return button
}()

Expand Down Expand Up @@ -77,7 +79,7 @@ final class EditScanViewController: UIViewController {
} else {
navigationItem.leftBarButtonItem = nil
}

navigationController?.navigationBar.tintColor = .white
zoomGestureController = ZoomGestureController(image: image, quadView: quadView)

let touchDown = UILongPressGestureRecognizer(target: zoomGestureController, action: #selector(zoomGestureController.handle(pan:)))
Expand Down
1 change: 0 additions & 1 deletion WeScan/ImageScannerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public final class ImageScannerController: UINavigationController {
super.init(rootViewController: ScannerViewController())

self.imageScannerDelegate = delegate
navigationBar.isTranslucent = false
self.view.addSubview(blackFlashView)
setupConstraints()

Expand Down
2 changes: 1 addition & 1 deletion WeScan/Review/ReviewViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class ReviewViewController: UIViewController {

lazy private var doneButton: UIBarButtonItem = {
let button = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(finishScan))
button.tintColor = navigationController?.navigationBar.tintColor
button.tintColor = .white
return button
}()

Expand Down
7 changes: 0 additions & 7 deletions WeScan/Scan/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,16 @@ final class ScannerViewController: UIViewController {
captureSessionManager = CaptureSessionManager(videoPreviewLayer: videoPreviewLayer)
captureSessionManager?.delegate = self

originalBarStyle = navigationController?.navigationBar.barStyle

NotificationCenter.default.addObserver(self, selector: #selector(subjectAreaDidChange), name: Notification.Name.AVCaptureDeviceSubjectAreaDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(captureSessionStopped(_:)), name: Notification.Name.AVCaptureSessionWasInterrupted, object: nil)
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

CaptureSession.current.isEditing = false
quadView.removeQuadrilateral()
captureSessionManager?.start()
UIApplication.shared.isIdleTimerDisabled = true
navigationController?.navigationBar.barStyle = .black
navigationController?.navigationBar.isTranslucent = true
navigationController?.navigationBar.barTintColor = .black
navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
setNeedsStatusBarAppearanceUpdate()
setupVideoOrientation()
setupViewsForCurrentOrientation()
Expand Down