-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from chausovSurfStudio/dev
Версия 1.2.1
- Loading branch information
Showing
115 changed files
with
782 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
SurfPlaybook/Playbook/Flows/Main/Chapter/Configurator/ChapterModuleConfigurator.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// ChapterModuleConfigurator.swift | ||
// SurfPlaybook | ||
// | ||
// Created by Александр Чаусов on 20/05/2021. | ||
// Copyright © 2021 Surf. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
final class ChapterModuleConfigurator { | ||
|
||
func configure(chapter: ChapterModel) -> (UIViewController, ChapterModuleOutput) { | ||
let view = UIViewController.instantiate(ofType: ChapterViewController.self) | ||
let presenter = ChapterPresenter(chapter: chapter) | ||
|
||
presenter.view = view | ||
view.output = presenter | ||
|
||
return (view, presenter) | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
SurfPlaybook/Playbook/Flows/Main/Chapter/Presenter/ChapterModuleInput.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// ChapterModuleInput.swift | ||
// SurfPlaybook | ||
// | ||
// Created by Александр Чаусов on 20/05/2021. | ||
// Copyright © 2021 Surf. All rights reserved. | ||
// | ||
|
||
protocol ChapterModuleInput: AnyObject { | ||
} |
11 changes: 11 additions & 0 deletions
11
SurfPlaybook/Playbook/Flows/Main/Chapter/Presenter/ChapterModuleOutput.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// ChapterModuleOutput.swift | ||
// SurfPlaybook | ||
// | ||
// Created by Александр Чаусов on 20/05/2021. | ||
// Copyright © 2021 Surf. All rights reserved. | ||
// | ||
|
||
protocol ChapterModuleOutput: AnyObject { | ||
var onPageShow: Closure<PlaybookPage>? { get set } | ||
} |
48 changes: 48 additions & 0 deletions
48
SurfPlaybook/Playbook/Flows/Main/Chapter/Presenter/ChapterPresenter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// ChapterPresenter.swift | ||
// SurfPlaybook | ||
// | ||
// Created by Александр Чаусов on 20/05/2021. | ||
// Copyright © 2021 Surf. All rights reserved. | ||
// | ||
|
||
final class ChapterPresenter: ChapterModuleOutput { | ||
|
||
// MARK: - ChapterModuleOutput | ||
|
||
var onPageShow: Closure<PlaybookPage>? | ||
|
||
// MARK: - Properties | ||
|
||
weak var view: ChapterViewInput? | ||
|
||
// MARK: - Private Properties | ||
|
||
private let chapter: ChapterModel | ||
|
||
// MARK: - Initialization | ||
|
||
init(chapter: ChapterModel) { | ||
self.chapter = chapter | ||
} | ||
|
||
} | ||
|
||
// MARK: - ChapterModuleInput | ||
|
||
extension ChapterPresenter: ChapterModuleInput { | ||
} | ||
|
||
// MARK: - ChapterViewOutput | ||
|
||
extension ChapterPresenter: ChapterViewOutput { | ||
|
||
func viewLoaded() { | ||
view?.setupInitialState(with: chapter) | ||
} | ||
|
||
func showPage(_ model: PageModel) { | ||
onPageShow?(model.playbookPage) | ||
} | ||
|
||
} |
Oops, something went wrong.