From f7af973a6e1e9c871d884c453aa44cc9c2f4f349 Mon Sep 17 00:00:00 2001 From: Mustafa Merza <mustafa.merza95@gmail.com> Date: Sun, 21 Jul 2024 11:32:58 +0300 Subject: [PATCH] - Added navigating to settings screen. --- .../Documents/DocumentsTableViewController.swift | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/MiniScanner/Modules/Documents/DocumentsTableViewController.swift b/MiniScanner/Modules/Documents/DocumentsTableViewController.swift index 4ce6db7..23fab39 100644 --- a/MiniScanner/Modules/Documents/DocumentsTableViewController.swift +++ b/MiniScanner/Modules/Documents/DocumentsTableViewController.swift @@ -145,16 +145,10 @@ final class DocumentsTableViewController: UIViewController, UITableViewDelegate, } @objc private func openSettings() { - if #available(iOS 16.0, *) { - let liveScan = DataScannerViewController(recognizedDataTypes: [.text()], - qualityLevel: .balanced, - isHighlightingEnabled: true) - liveScan.delegate = self - try? liveScan.startScanning() - self.present(liveScan, animated: true) - } else { - let settings = SettingViewController() - self.navigationController?.pushViewController(settings, animated: false) + + if let navigationController { + let settingsCoorindator = SettingsViewCoordinator(navigationController: navigationController) + settingsCoorindator.start() } } -- GitLab