From d9a8eb77afc906138c79eeedab677bded9bd3db8 Mon Sep 17 00:00:00 2001 From: Mustafa Merza <mustafa.merza95@gmail.com> Date: Thu, 15 Aug 2024 21:14:28 +0300 Subject: [PATCH] - Added credits screen. --- MiniScanner.xcodeproj/project.pbxproj | 58 ++++++++++++++++++- .../Core/Extensions/Image+Images.swift | 1 + .../Core/Extensions/String+StringKeys.swift | 2 + .../Localization/Localizable.xcstrings | 17 ++++++ .../info-ic.imageset/Contents.json | 16 +++++ .../info-ic.imageset/info-ic.svg | 3 + .../Settings/Data/Models/Local/Credit.swift | 35 +++++++++++ .../Presentation/Credits/CreditCell.swift | 43 ++++++++++++++ .../Credits/CreditsListView.swift | 32 ++++++++++ .../Presentation/Credits/CreditsView.swift | 39 +++++++++++++ .../Credits/CreditsViewCoordinator.swift | 31 ++++++++++ .../Credits/CreditsViewModel.swift | 41 +++++++++++++ .../Presentation/Settings/SettingsView.swift | 28 ++++++++- .../Settings/SettingsViewCoordinator.swift | 8 +++ .../Settings/SettingsViewModel.swift | 4 ++ 15 files changed, 356 insertions(+), 2 deletions(-) create mode 100644 MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/Contents.json create mode 100644 MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/info-ic.svg create mode 100644 MiniScanner/Features/Settings/Data/Models/Local/Credit.swift create mode 100644 MiniScanner/Features/Settings/Presentation/Credits/CreditCell.swift create mode 100644 MiniScanner/Features/Settings/Presentation/Credits/CreditsListView.swift create mode 100644 MiniScanner/Features/Settings/Presentation/Credits/CreditsView.swift create mode 100644 MiniScanner/Features/Settings/Presentation/Credits/CreditsViewCoordinator.swift create mode 100644 MiniScanner/Features/Settings/Presentation/Credits/CreditsViewModel.swift diff --git a/MiniScanner.xcodeproj/project.pbxproj b/MiniScanner.xcodeproj/project.pbxproj index fef1730..9c3c826 100644 --- a/MiniScanner.xcodeproj/project.pbxproj +++ b/MiniScanner.xcodeproj/project.pbxproj @@ -165,6 +165,12 @@ 6709C0622C6E2373009C3F11 /* ZoomableScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0612C6E2373009C3F11 /* ZoomableScrollView.swift */; }; 6709C0642C6E2495009C3F11 /* ZoomableImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0632C6E2495009C3F11 /* ZoomableImageView.swift */; }; 6709C0662C6E2C87009C3F11 /* EditScreenMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0652C6E2C87009C3F11 /* EditScreenMode.swift */; }; + 6709C06F2C6E7372009C3F11 /* CreditsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C06E2C6E7372009C3F11 /* CreditsView.swift */; }; + 6709C0712C6E7379009C3F11 /* CreditsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0702C6E7379009C3F11 /* CreditsViewModel.swift */; }; + 6709C0732C6E7380009C3F11 /* CreditsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0722C6E7380009C3F11 /* CreditsListView.swift */; }; + 6709C0752C6E7387009C3F11 /* CreditCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0742C6E7387009C3F11 /* CreditCell.swift */; }; + 6709C07A2C6E73B7009C3F11 /* Credit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C0792C6E73B7009C3F11 /* Credit.swift */; }; + 6709C07C2C6E75AC009C3F11 /* CreditsViewCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C07B2C6E75AC009C3F11 /* CreditsViewCoordinator.swift */; }; 67106C942C4EAC0100874BFC /* CustomTabBarLayerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67106C922C4EAC0000874BFC /* CustomTabBarLayerProtocol.swift */; }; 67106C952C4EAC0100874BFC /* CustomTabBarLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67106C932C4EAC0000874BFC /* CustomTabBarLayer.swift */; }; 672C46442C47B1F300497EF0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 672C46432C47B1F300497EF0 /* Localizable.xcstrings */; }; @@ -500,6 +506,12 @@ 6709C0612C6E2373009C3F11 /* ZoomableScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZoomableScrollView.swift; sourceTree = "<group>"; }; 6709C0632C6E2495009C3F11 /* ZoomableImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZoomableImageView.swift; sourceTree = "<group>"; }; 6709C0652C6E2C87009C3F11 /* EditScreenMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditScreenMode.swift; sourceTree = "<group>"; }; + 6709C06E2C6E7372009C3F11 /* CreditsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsView.swift; sourceTree = "<group>"; }; + 6709C0702C6E7379009C3F11 /* CreditsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsViewModel.swift; sourceTree = "<group>"; }; + 6709C0722C6E7380009C3F11 /* CreditsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsListView.swift; sourceTree = "<group>"; }; + 6709C0742C6E7387009C3F11 /* CreditCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditCell.swift; sourceTree = "<group>"; }; + 6709C0792C6E73B7009C3F11 /* Credit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Credit.swift; sourceTree = "<group>"; }; + 6709C07B2C6E75AC009C3F11 /* CreditsViewCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsViewCoordinator.swift; sourceTree = "<group>"; }; 67106C922C4EAC0000874BFC /* CustomTabBarLayerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTabBarLayerProtocol.swift; sourceTree = "<group>"; }; 67106C932C4EAC0000874BFC /* CustomTabBarLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTabBarLayer.swift; sourceTree = "<group>"; }; 672C46432C47B1F300497EF0 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; }; @@ -1172,6 +1184,42 @@ path = ImageCompress; sourceTree = "<group>"; }; + 6709C06B2C6E735F009C3F11 /* Credits */ = { + isa = PBXGroup; + children = ( + 6709C06E2C6E7372009C3F11 /* CreditsView.swift */, + 6709C0702C6E7379009C3F11 /* CreditsViewModel.swift */, + 6709C0722C6E7380009C3F11 /* CreditsListView.swift */, + 6709C0742C6E7387009C3F11 /* CreditCell.swift */, + 6709C07B2C6E75AC009C3F11 /* CreditsViewCoordinator.swift */, + ); + path = Credits; + sourceTree = "<group>"; + }; + 6709C0762C6E7397009C3F11 /* Data */ = { + isa = PBXGroup; + children = ( + 6709C0772C6E73A3009C3F11 /* Models */, + ); + path = Data; + sourceTree = "<group>"; + }; + 6709C0772C6E73A3009C3F11 /* Models */ = { + isa = PBXGroup; + children = ( + 6709C0782C6E73AF009C3F11 /* Local */, + ); + path = Models; + sourceTree = "<group>"; + }; + 6709C0782C6E73AF009C3F11 /* Local */ = { + isa = PBXGroup; + children = ( + 6709C0792C6E73B7009C3F11 /* Credit.swift */, + ); + path = Local; + sourceTree = "<group>"; + }; 67106C962C4EAC3100874BFC /* CustomTabBarLayer */ = { isa = PBXGroup; children = ( @@ -1651,8 +1699,9 @@ 678BD7132C4CF1EB00833DA5 /* Presentation */ = { isa = PBXGroup; children = ( - 6709C06A2C6E7333009C3F11 /* ImageCompress */, 6709C0692C6E7326009C3F11 /* Settings */, + 6709C06A2C6E7333009C3F11 /* ImageCompress */, + 6709C06B2C6E735F009C3F11 /* Credits */, ); path = Presentation; sourceTree = "<group>"; @@ -1660,6 +1709,7 @@ 678BD7142C4CF1EB00833DA5 /* Settings */ = { isa = PBXGroup; children = ( + 6709C0762C6E7397009C3F11 /* Data */, 678BD7132C4CF1EB00833DA5 /* Presentation */, ); path = Settings; @@ -2068,6 +2118,7 @@ 672C46682C47C75100497EF0 /* Clear.swift in Sources */, 672C46912C47CB5D00497EF0 /* UserDefaultsKeys.swift in Sources */, 677E65B62C5A13F00039E2C5 /* ScanSessionDependencyManager.swift in Sources */, + 6709C07C2C6E75AC009C3F11 /* CreditsViewCoordinator.swift in Sources */, 5399968E2C27130000671340 /* ConstraintMakerRelatable+Extensions.swift in Sources */, 539996512C26E86700671340 /* DefaultValues.m in Sources */, 53014FA42C11A8E80071CE39 /* EditScanViewController.swift in Sources */, @@ -2202,9 +2253,11 @@ 5399968A2C27130000671340 /* ConstraintMakerExtendable.swift in Sources */, 67A2AF792C6B6F7700039F30 /* EmptyAction.swift in Sources */, 67A20DDD2C57A142009D2F25 /* DocumentLayout.swift in Sources */, + 6709C07A2C6E73B7009C3F11 /* Credit.swift in Sources */, 53014FBA2C11A8E80071CE39 /* CaptureSession+Flash.swift in Sources */, 539996572C27124B00671340 /* FontChooserContainerView.swift in Sources */, 53014F952C11A8E80071CE39 /* FocusRectangleView.swift in Sources */, + 6709C06F2C6E7372009C3F11 /* CreditsView.swift in Sources */, 676C30622C6C98EB00C29A43 /* ColorStyle.swift in Sources */, 672C46C62C47E98A00497EF0 /* ChangeLanguageUseCase.swift in Sources */, 53014F9E2C11A8E80071CE39 /* UIImage+Orientation.swift in Sources */, @@ -2213,11 +2266,14 @@ 67807F9B2C49325A00D1F168 /* MainView.swift in Sources */, 5399969D2C27130000671340 /* Constraint.swift in Sources */, EC8A9B1D254DCEC600F9AF99 /* File.swift in Sources */, + 6709C0712C6E7379009C3F11 /* CreditsViewModel.swift in Sources */, 6796505C2C6DE8ED001C4353 /* DefaultSignatureSheetViewController.swift in Sources */, 67807F8C2C48F49B00D1F168 /* HandleAppLanguageUseCase.swift in Sources */, + 6709C0732C6E7380009C3F11 /* CreditsListView.swift in Sources */, 67A20DE12C57BC56009D2F25 /* DocumentsCollectionViewCell.swift in Sources */, 676C30682C6CA6D200C29A43 /* UIButton+CustomColor.swift in Sources */, 53E7D33A2C1B00880025A1D3 /* FSPageControl.swift in Sources */, + 6709C0752C6E7387009C3F11 /* CreditCell.swift in Sources */, EC8A9B24254DE72F00F9AF99 /* UIView+Extensions.swift in Sources */, EC0CF200254D8BBF00888722 /* SceneDelegate.swift in Sources */, 53014FBB2C11A8E80071CE39 /* CaptureSession+Orientation.swift in Sources */, diff --git a/MiniScanner/Core/Extensions/Image+Images.swift b/MiniScanner/Core/Extensions/Image+Images.swift index b793be4..c559b1c 100644 --- a/MiniScanner/Core/Extensions/Image+Images.swift +++ b/MiniScanner/Core/Extensions/Image+Images.swift @@ -15,6 +15,7 @@ extension Image { static let brush = Image(.brushIc) static let fileDown = Image(.fileDownIc) static let smartphone = Image(.smartphoneIc) + static let info = Image(.infoIc) } // MARK: - Common system images and icons diff --git a/MiniScanner/Core/Extensions/String+StringKeys.swift b/MiniScanner/Core/Extensions/String+StringKeys.swift index 4ec20d5..01c4766 100644 --- a/MiniScanner/Core/Extensions/String+StringKeys.swift +++ b/MiniScanner/Core/Extensions/String+StringKeys.swift @@ -138,4 +138,6 @@ extension String { static let clear = "clear" static let selectFolder = "select_folder" + + static let credits = "credits" } diff --git a/MiniScanner/Core/Presentation/Localization/Localizable.xcstrings b/MiniScanner/Core/Presentation/Localization/Localizable.xcstrings index 9f530f3..bb821d9 100644 --- a/MiniScanner/Core/Presentation/Localization/Localizable.xcstrings +++ b/MiniScanner/Core/Presentation/Localization/Localizable.xcstrings @@ -451,6 +451,23 @@ } } }, + "credits" : { + "extractionState" : "manual", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "الاعتمادات" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Credits" + } + } + } + }, "crop" : { "extractionState" : "manual", "localizations" : { diff --git a/MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/Contents.json b/MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/Contents.json new file mode 100644 index 0000000..ed45fa3 --- /dev/null +++ b/MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "info-ic.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/info-ic.svg b/MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/info-ic.svg new file mode 100644 index 0000000..2e39c44 --- /dev/null +++ b/MiniScanner/Core/Resources/Icons.xcassets/info-ic.imageset/info-ic.svg @@ -0,0 +1,3 @@ +<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M13.9999 18.6663V13.9997M13.9999 9.33301H14.0116M25.6666 13.9997C25.6666 20.443 20.4432 25.6663 13.9999 25.6663C7.5566 25.6663 2.33325 20.443 2.33325 13.9997C2.33325 7.55635 7.5566 2.33301 13.9999 2.33301C20.4432 2.33301 25.6666 7.55635 25.6666 13.9997Z" stroke="#1C1C1E" stroke-width="2.33333" stroke-linecap="round" stroke-linejoin="round"/> +</svg> diff --git a/MiniScanner/Features/Settings/Data/Models/Local/Credit.swift b/MiniScanner/Features/Settings/Data/Models/Local/Credit.swift new file mode 100644 index 0000000..3be16c9 --- /dev/null +++ b/MiniScanner/Features/Settings/Data/Models/Local/Credit.swift @@ -0,0 +1,35 @@ +// +// Credit.swift +// MiniScanner +// +// Created by Mustafa Merza on 8/15/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import Foundation + +struct Credit: Identifiable { + + let id: UUID = UUID() + + var title: String + var name: String +} + +extension Credit { + static let placeholder = Credit(title: "Title", name: "Name") +} + +extension [Credit] { + + static let placeholder: [Credit] = { + var placeholder: [Credit] = [] + + for i in 1...5 { + + placeholder.append(Credit(title: "Title \(i)", name: "Name \(i)")) + } + + return placeholder + }() +} diff --git a/MiniScanner/Features/Settings/Presentation/Credits/CreditCell.swift b/MiniScanner/Features/Settings/Presentation/Credits/CreditCell.swift new file mode 100644 index 0000000..603e2da --- /dev/null +++ b/MiniScanner/Features/Settings/Presentation/Credits/CreditCell.swift @@ -0,0 +1,43 @@ +// +// CreditCell.swift +// MiniScanner +// +// Created by Mustafa Merza on 8/15/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import SwiftUI + +struct CreditCell: View { + + var credit: Credit + + var body: some View { + creditItem + } + + private var creditItem: some View { + VStack(spacing: 10) { + + title + + name + } + } + + private var title: some View { + Text(credit.title) + .customForeground(.gray600) + .customFont(.regular(20)) + } + + private var name: some View { + Text(credit.name) + .customForeground(.gray600) + .customFont(.bold(24)) + } +} + +#Preview { + CreditCell(credit: .placeholder) +} diff --git a/MiniScanner/Features/Settings/Presentation/Credits/CreditsListView.swift b/MiniScanner/Features/Settings/Presentation/Credits/CreditsListView.swift new file mode 100644 index 0000000..f4ab078 --- /dev/null +++ b/MiniScanner/Features/Settings/Presentation/Credits/CreditsListView.swift @@ -0,0 +1,32 @@ +// +// CreditsListView.swift +// MiniScanner +// +// Created by Mustafa Merza on 8/15/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import SwiftUI + +struct CreditsListView: View { + + var credits: [Credit] + + var body: some View { + list + } + + private var list: some View { + VStack(spacing: 48) { + + ForEach(credits) { credit in + + CreditCell(credit: credit) + } + } + } +} + +#Preview { + CreditsListView(credits: .placeholder) +} diff --git a/MiniScanner/Features/Settings/Presentation/Credits/CreditsView.swift b/MiniScanner/Features/Settings/Presentation/Credits/CreditsView.swift new file mode 100644 index 0000000..3575a21 --- /dev/null +++ b/MiniScanner/Features/Settings/Presentation/Credits/CreditsView.swift @@ -0,0 +1,39 @@ +// +// CreditsView.swift +// MiniScanner +// +// Created by Mustafa Merza on 8/15/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import SwiftUI + +struct CreditsView: View { + + @StateObject var viewModel: CreditsViewModel + + init(coordinator: CreditsViewCoordinating) { + _viewModel = StateObject(wrappedValue: CreditsViewModel(coordinator: coordinator)) + } + + var body: some View { + MainView(viewModel: viewModel) { + + NoIndicatorsScrollView { + + creditsList + } + } + } +} + +extension CreditsView { + + private var creditsList: some View { + CreditsListView(credits: viewModel.credits) + } +} + +#Preview { + CreditsView(coordinator: CreditsViewCoordinator(navigationController: UINavigationController())) +} diff --git a/MiniScanner/Features/Settings/Presentation/Credits/CreditsViewCoordinator.swift b/MiniScanner/Features/Settings/Presentation/Credits/CreditsViewCoordinator.swift new file mode 100644 index 0000000..f2941f8 --- /dev/null +++ b/MiniScanner/Features/Settings/Presentation/Credits/CreditsViewCoordinator.swift @@ -0,0 +1,31 @@ +// +// CreditsViewCoordinator.swift +// MiniScanner +// +// Created by Mustafa Merza on 8/15/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import Foundation + + +import UIKit + +protocol CreditsViewCoordinating { + +} + +class CreditsViewCoordinator: MainCoordinator, CreditsViewCoordinating { + + var navigationController: UINavigationController + + init(navigationController: UINavigationController) { + self.navigationController = navigationController + } + + func start() { + let view = CreditsView(coordinator: self) + + coordinateToView(view) + } +} diff --git a/MiniScanner/Features/Settings/Presentation/Credits/CreditsViewModel.swift b/MiniScanner/Features/Settings/Presentation/Credits/CreditsViewModel.swift new file mode 100644 index 0000000..7ddcbea --- /dev/null +++ b/MiniScanner/Features/Settings/Presentation/Credits/CreditsViewModel.swift @@ -0,0 +1,41 @@ +// +// CreditsViewModel.swift +// MiniScanner +// +// Created by Mustafa Merza on 8/15/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import Foundation + +final class CreditsViewModel: MainViewModel { + + @Published var credits: [Credit] = [] + + private var coordinator: CreditsViewCoordinating + + init(coordinator: CreditsViewCoordinating) { + self.coordinator = coordinator + } +} + +extension CreditsViewModel { + + func onAppear() { + fetchCredits() + } +} + +extension CreditsViewModel { + + private func fetchCredits() { + + var credit = Credit(title: "Project Manager 🔭", name: "Mohamad Arab") + + credits = [Credit(title: "Project Manager 🔭", name: "Mohamad Arab"), + Credit(title: "Product Manager 🖥️", name: "Abdulaziz Ayman"), + Credit(title: "IOS Developer 📱", name: "George Makhoul"), + Credit(title: "Android Developer 💻", name: "Mohammad Makarati"), + Credit(title: "Product Designer 🎨", name: "Mohammad Makarati")] + } +} diff --git a/MiniScanner/Features/Settings/Presentation/Settings/SettingsView.swift b/MiniScanner/Features/Settings/Presentation/Settings/SettingsView.swift index e350986..3b9e382 100644 --- a/MiniScanner/Features/Settings/Presentation/Settings/SettingsView.swift +++ b/MiniScanner/Features/Settings/Presentation/Settings/SettingsView.swift @@ -93,7 +93,10 @@ extension SettingsView { screenType + credits + compress + .padding(.horizontal, 32) } } @@ -153,10 +156,33 @@ extension SettingsView { saveAction: viewModel.onScreenSaveClick) } + private var credits: some View { + Button(action: viewModel.onCreditsClick, + label: { + + HStack(alignment: .top, spacing: 20) { + + Image.info + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 20, height: 20) + .customForeground(.gray600) + + VStack(alignment: .leading, spacing: 6) { + + Text(String.credits.localized) + .customForeground(.gray600) + .customFont(.bold(16)) + } + + Spacer() + } + }) + } + private var compress: some View { PrimaryButton(title: "Compress Image Tester", action: viewModel.onCompressClick) - .padding(.horizontal, 32) } } diff --git a/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewCoordinator.swift b/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewCoordinator.swift index 69d0f34..6da50f7 100644 --- a/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewCoordinator.swift +++ b/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewCoordinator.swift @@ -12,6 +12,7 @@ import PhotosUI protocol SettingsViewCoordinating: MainCoordinator { var navigationController: UINavigationController { get set } + func coordinateToCredits() func displayImagePicker(delegate: PHPickerViewControllerDelegate) } @@ -28,6 +29,13 @@ class SettingsViewCoordinator: SettingsViewCoordinating { coordinateToView(view, title: .settings.localized) } + func coordinateToCredits() { + + let coordinator = CreditsViewCoordinator(navigationController: navigationController) + + coordinate(to: coordinator) + } + func displayImagePicker(delegate: PHPickerViewControllerDelegate) { var configuration = PHPickerConfiguration() configuration.selectionLimit = 1 diff --git a/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewModel.swift b/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewModel.swift index 5a16e05..4688374 100644 --- a/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewModel.swift +++ b/MiniScanner/Features/Settings/Presentation/Settings/SettingsViewModel.swift @@ -148,6 +148,10 @@ extension SettingsViewModel { hideScreenSheet() } + func onCreditsClick() { + coordinator.coordinateToCredits() + } + func onCompressClick() { coordinator.displayImagePicker(delegate: self) } -- GitLab