Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint 06 #712

Open
wants to merge 7 commits into
base: project_sprint_3_start
Choose a base branch
from
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
106 changes: 102 additions & 4 deletions MovieQuiz.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@
objects = {

/* Begin PBXBuildFile section */
5B79B2E92B6148620038C5BD /* QuestionFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2E82B6148620038C5BD /* QuestionFactory.swift */; };
5B79B2ED2B614CF20038C5BD /* QuizStepViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2EC2B614CF20038C5BD /* QuizStepViewModel.swift */; };
5B79B2EF2B614D060038C5BD /* QuizResultsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2EE2B614D060038C5BD /* QuizResultsViewModel.swift */; };
5B79B2F12B614D130038C5BD /* QuizQuestion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2F02B614D130038C5BD /* QuizQuestion.swift */; };
5B79B2F32B61531A0038C5BD /* QuestionFactoryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2F22B61531A0038C5BD /* QuestionFactoryProtocol.swift */; };
5B79B2F52B6157D30038C5BD /* QuestionFactoryDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2F42B6157D30038C5BD /* QuestionFactoryDelegate.swift */; };
5B79B2F72B6163310038C5BD /* AlertModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2F62B6163310038C5BD /* AlertModel.swift */; };
5B79B2F92B61636F0038C5BD /* AlertPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2F82B61636F0038C5BD /* AlertPresenter.swift */; };
5B79B2FB2B6164740038C5BD /* AlertPresenterDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2FA2B6164740038C5BD /* AlertPresenterDelegate.swift */; };
5B79B2FE2B6164D20038C5BD /* AlertPresenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B79B2FD2B6164D20038C5BD /* AlertPresenterProtocol.swift */; };
5B97056A2B3D87AE0085C274 /* YS Display-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5B9705682B3D87AE0085C274 /* YS Display-Bold.ttf */; };
5B97056B2B3D87AE0085C274 /* YS Display-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5B9705692B3D87AE0085C274 /* YS Display-Medium.ttf */; };
5BF0D5C52B712B3100875F8F /* NetworkClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF0D5C42B712B3100875F8F /* NetworkClient.swift */; };
5BF0D5C72B712BA500875F8F /* MostPopularMovies.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF0D5C62B712BA500875F8F /* MostPopularMovies.swift */; };
5BF0D5C92B7131C300875F8F /* MoviesLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF0D5C82B7131C300875F8F /* MoviesLoader.swift */; };
5BF0D5CB2B7258A900875F8F /* Float+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF0D5CA2B7258A900875F8F /* Float+Extensions.swift */; };
5BF17A122B619DA7003F65F5 /* GameRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF17A112B619DA7003F65F5 /* GameRecord.swift */; };
5BF17A142B619E4C003F65F5 /* StatisticService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF17A132B619E4C003F65F5 /* StatisticService.swift */; };
5BF17A182B61A342003F65F5 /* StatisticServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF17A172B61A342003F65F5 /* StatisticServiceProtocol.swift */; };
AD1ABAB22831907B00B3E448 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1ABAB12831907B00B3E448 /* AppDelegate.swift */; };
AD1ABAB42831907B00B3E448 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1ABAB32831907B00B3E448 /* SceneDelegate.swift */; };
AD1ABAB62831907B00B3E448 /* MovieQuizViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1ABAB52831907B00B3E448 /* MovieQuizViewController.swift */; };
Expand All @@ -19,6 +38,25 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
5B79B2E82B6148620038C5BD /* QuestionFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuestionFactory.swift; sourceTree = "<group>"; };
5B79B2EC2B614CF20038C5BD /* QuizStepViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuizStepViewModel.swift; sourceTree = "<group>"; };
5B79B2EE2B614D060038C5BD /* QuizResultsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuizResultsViewModel.swift; sourceTree = "<group>"; };
5B79B2F02B614D130038C5BD /* QuizQuestion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuizQuestion.swift; sourceTree = "<group>"; };
5B79B2F22B61531A0038C5BD /* QuestionFactoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuestionFactoryProtocol.swift; sourceTree = "<group>"; };
5B79B2F42B6157D30038C5BD /* QuestionFactoryDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuestionFactoryDelegate.swift; sourceTree = "<group>"; };
5B79B2F62B6163310038C5BD /* AlertModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertModel.swift; sourceTree = "<group>"; };
5B79B2F82B61636F0038C5BD /* AlertPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresenter.swift; sourceTree = "<group>"; };
5B79B2FA2B6164740038C5BD /* AlertPresenterDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresenterDelegate.swift; sourceTree = "<group>"; };
5B79B2FD2B6164D20038C5BD /* AlertPresenterProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresenterProtocol.swift; sourceTree = "<group>"; };
5B9705682B3D87AE0085C274 /* YS Display-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "YS Display-Bold.ttf"; sourceTree = "<group>"; };
5B9705692B3D87AE0085C274 /* YS Display-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "YS Display-Medium.ttf"; sourceTree = "<group>"; };
5BF0D5C42B712B3100875F8F /* NetworkClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkClient.swift; sourceTree = "<group>"; };
5BF0D5C62B712BA500875F8F /* MostPopularMovies.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MostPopularMovies.swift; sourceTree = "<group>"; };
5BF0D5C82B7131C300875F8F /* MoviesLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoviesLoader.swift; sourceTree = "<group>"; };
5BF0D5CA2B7258A900875F8F /* Float+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Float+Extensions.swift"; sourceTree = "<group>"; };
5BF17A112B619DA7003F65F5 /* GameRecord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameRecord.swift; sourceTree = "<group>"; };
5BF17A132B619E4C003F65F5 /* StatisticService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatisticService.swift; sourceTree = "<group>"; };
5BF17A172B61A342003F65F5 /* StatisticServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatisticServiceProtocol.swift; sourceTree = "<group>"; };
AD1ABAAE2831907B00B3E448 /* MovieQuiz.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MovieQuiz.app; sourceTree = BUILT_PRODUCTS_DIR; };
AD1ABAB12831907B00B3E448 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
AD1ABAB32831907B00B3E448 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -43,18 +81,58 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5B79B2E72B6147F10038C5BD /* Services */ = {
isa = PBXGroup;
children = (
5B79B2E82B6148620038C5BD /* QuestionFactory.swift */,
5B79B2F22B61531A0038C5BD /* QuestionFactoryProtocol.swift */,
5B79B2F42B6157D30038C5BD /* QuestionFactoryDelegate.swift */,
5BF17A132B619E4C003F65F5 /* StatisticService.swift */,
5BF17A172B61A342003F65F5 /* StatisticServiceProtocol.swift */,
5BF0D5C42B712B3100875F8F /* NetworkClient.swift */,
5BF0D5C82B7131C300875F8F /* MoviesLoader.swift */,
);
path = Services;
sourceTree = "<group>";
};
5B79B2EB2B614CD10038C5BD /* Models */ = {
isa = PBXGroup;
children = (
5B79B2EC2B614CF20038C5BD /* QuizStepViewModel.swift */,
5B79B2EE2B614D060038C5BD /* QuizResultsViewModel.swift */,
5B79B2F02B614D130038C5BD /* QuizQuestion.swift */,
5B79B2F62B6163310038C5BD /* AlertModel.swift */,
5BF17A112B619DA7003F65F5 /* GameRecord.swift */,
5BF0D5C62B712BA500875F8F /* MostPopularMovies.swift */,
);
path = Models;
sourceTree = "<group>";
};
5BB12ED02B3498C800853923 /* Fonts */ = {
isa = PBXGroup;
children = (
5B9705682B3D87AE0085C274 /* YS Display-Bold.ttf */,
5B9705692B3D87AE0085C274 /* YS Display-Medium.ttf */,
);
path = Fonts;
sourceTree = "<group>";
};
8F4738322848DE2A005DF65E /* Presentation */ = {
isa = PBXGroup;
children = (
AD1ABAB52831907B00B3E448 /* MovieQuizViewController.swift */,
AD1ABAB72831907B00B3E448 /* Main.storyboard */,
5B79B2F82B61636F0038C5BD /* AlertPresenter.swift */,
5B79B2FA2B6164740038C5BD /* AlertPresenterDelegate.swift */,
5B79B2FD2B6164D20038C5BD /* AlertPresenterProtocol.swift */,
);
path = Presentation;
sourceTree = "<group>";
};
8F4738332848DE46005DF65E /* Resources */ = {
isa = PBXGroup;
children = (
5BB12ED02B3498C800853923 /* Fonts */,
AD1ABABC2831907F00B3E448 /* LaunchScreen.storyboard */,
AD1ABABA2831907F00B3E448 /* Assets.xcassets */,
AD1ABABF2831907F00B3E448 /* Info.plist */,
Expand All @@ -81,6 +159,8 @@
AD1ABAB02831907B00B3E448 /* MovieQuiz */ = {
isa = PBXGroup;
children = (
5B79B2EB2B614CD10038C5BD /* Models */,
5B79B2E72B6147F10038C5BD /* Services */,
8F4738322848DE2A005DF65E /* Presentation */,
ADF0CF75283FDAA10075F54D /* Helpers */,
8F4738332848DE46005DF65E /* Resources */,
Expand All @@ -96,6 +176,7 @@
AD5EE5DD284D7887003966EF /* UIColor+Extensions.swift */,
AD7AFA542836189F00399704 /* Array+Extensions.swift */,
AD77F5732857F8810062FB14 /* Date+Extensions.swift */,
5BF0D5CA2B7258A900875F8F /* Float+Extensions.swift */,
);
path = Helpers;
sourceTree = "<group>";
Expand Down Expand Up @@ -162,6 +243,8 @@
AD1ABABE2831907F00B3E448 /* LaunchScreen.storyboard in Resources */,
AD1ABABB2831907F00B3E448 /* Assets.xcassets in Resources */,
AD1ABAB92831907B00B3E448 /* Main.storyboard in Resources */,
5B97056A2B3D87AE0085C274 /* YS Display-Bold.ttf in Resources */,
5B97056B2B3D87AE0085C274 /* YS Display-Medium.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -173,10 +256,27 @@
buildActionMask = 2147483647;
files = (
AD5EE5DE284D7887003966EF /* UIColor+Extensions.swift in Sources */,
5B79B2F92B61636F0038C5BD /* AlertPresenter.swift in Sources */,
5B79B2F72B6163310038C5BD /* AlertModel.swift in Sources */,
AD7AFA552836189F00399704 /* Array+Extensions.swift in Sources */,
5BF17A182B61A342003F65F5 /* StatisticServiceProtocol.swift in Sources */,
5B79B2F32B61531A0038C5BD /* QuestionFactoryProtocol.swift in Sources */,
5B79B2FB2B6164740038C5BD /* AlertPresenterDelegate.swift in Sources */,
5B79B2F52B6157D30038C5BD /* QuestionFactoryDelegate.swift in Sources */,
AD1ABAB62831907B00B3E448 /* MovieQuizViewController.swift in Sources */,
5B79B2ED2B614CF20038C5BD /* QuizStepViewModel.swift in Sources */,
5B79B2FE2B6164D20038C5BD /* AlertPresenterProtocol.swift in Sources */,
5BF0D5C52B712B3100875F8F /* NetworkClient.swift in Sources */,
5B79B2F12B614D130038C5BD /* QuizQuestion.swift in Sources */,
5BF17A122B619DA7003F65F5 /* GameRecord.swift in Sources */,
5B79B2E92B6148620038C5BD /* QuestionFactory.swift in Sources */,
AD77F5742857F8810062FB14 /* Date+Extensions.swift in Sources */,
AD1ABAB22831907B00B3E448 /* AppDelegate.swift in Sources */,
5BF0D5C92B7131C300875F8F /* MoviesLoader.swift in Sources */,
5B79B2EF2B614D060038C5BD /* QuizResultsViewModel.swift in Sources */,
5BF0D5C72B712BA500875F8F /* MostPopularMovies.swift in Sources */,
5BF17A142B619E4C003F65F5 /* StatisticService.swift in Sources */,
5BF0D5CB2B7258A900875F8F /* Float+Extensions.swift in Sources */,
AD1ABAB42831907B00B3E448 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -331,8 +431,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -361,8 +460,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
16 changes: 16 additions & 0 deletions MovieQuiz/Helpers/Float+Extensions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Float+Extensions.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 06.02.2024.
//

import Foundation

extension Float {
static var randomMovieRating: Float {
let randomFloat = Float.random(in: 1.0...10.0)
let intVal:Int = Int(randomFloat*10)
return Float(intVal)/10.0
}
}
10 changes: 9 additions & 1 deletion MovieQuiz/Helpers/UIColor+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import UIKit

extension UIColor { }
extension UIColor {
static var ypBlack: UIColor { UIColor(named: "YP Black") ?? UIColor.black }
static var ypGray: UIColor { UIColor(named: "YP Gray") ?? UIColor.gray }
static var ypGreen: UIColor { UIColor(named: "YP Green") ?? UIColor.green }
static var ypRed: UIColor { UIColor(named: "YP Red") ?? UIColor.red }
static var ypWhite: UIColor { UIColor(named: "YP White") ?? UIColor.white }
static var ypBackground: UIColor { UIColor(named: "YP Background") ?? UIColor.systemBackground }

}
15 changes: 15 additions & 0 deletions MovieQuiz/Models/AlertModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// AlertModel.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import Foundation

struct AlertModel {
let title: String
let message: String
let buttonText: String
var buttonAction: (()->Void)?
}
18 changes: 18 additions & 0 deletions MovieQuiz/Models/GameRecord.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// GameRecord.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import Foundation

struct GameRecord: Codable {
let correct: Int
let total: Int
let date: Date

func isBetterThan(_ another: GameRecord) -> Bool {
correct > another.correct
}
}
39 changes: 39 additions & 0 deletions MovieQuiz/Models/MostPopularMovies.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// MostPopularMovies.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 05.02.2024.
//

import Foundation

struct MostPopularMovies: Codable {
let errorMessage: String
let items: [MostPopularMovie]
}

struct MostPopularMovie: Codable {
let title: String
let rating: String
let imageURL: URL

var resizedImageURL: URL {
// создаем строку из адреса
let urlString = imageURL.absoluteString
// обрезаем лишнюю часть и добавляем модификатор желаемого качества
let imageUrlString = urlString.components(separatedBy: "._")[0] + "._V0_UX600_.jpg"

// пытаемся создать новый адрес, если не получается возвращаем старый
guard let newURL = URL(string: imageUrlString) else {
return imageURL
}

return newURL
}

private enum CodingKeys: String, CodingKey {
case title = "fullTitle"
case rating = "imDbRating"
case imageURL = "image"
}
}
14 changes: 14 additions & 0 deletions MovieQuiz/Models/QuizQuestion.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// QuizQuestion.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import Foundation

struct QuizQuestion {
let image: Data
let text: String
let correctAnswer: Bool
}
14 changes: 14 additions & 0 deletions MovieQuiz/Models/QuizResultsViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// QuizResultsViewModel.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import Foundation

struct QuizResultsViewModel {
let title: String
let text: String
let buttonText: String
}
14 changes: 14 additions & 0 deletions MovieQuiz/Models/QuizStepViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// QuizStepViewModel.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import UIKit

struct QuizStepViewModel {
let image: UIImage
let question: String
let questionNumber: String
}
34 changes: 34 additions & 0 deletions MovieQuiz/Presentation/AlertPresenter.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// AlertPresenter.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import UIKit

final class AlertPresenter: AlertPresenterProtocol {

weak var delegate: AlertPresenterDelegate?

func show(alertModel: AlertModel) {
let alert = UIAlertController(
title: alertModel.title,
message: alertModel.message,
preferredStyle: .alert)

let action = UIAlertAction(
title: alertModel.buttonText,
style: .default,
handler: { _ in
alertModel.buttonAction?()
})

alert.addAction(action)
delegate?.show(alert: alert)
}

init(delegate: AlertPresenterDelegate?) {
self.delegate = delegate
}
}
13 changes: 13 additions & 0 deletions MovieQuiz/Presentation/AlertPresenterDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// AlertPresenterDelegate.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import Foundation
import UIKit

protocol AlertPresenterDelegate: AnyObject {
func show(alert: UIAlertController)
}
13 changes: 13 additions & 0 deletions MovieQuiz/Presentation/AlertPresenterProtocol.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// AlertPresenterProtocol.swift
// MovieQuiz
//
// Created by Сергей Баскаков on 24.01.2024.
//

import Foundation

protocol AlertPresenterProtocol: AnyObject {
var delegate: AlertPresenterDelegate? { get set }
func show(alertModel: AlertModel)
}
Loading