-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate PeopleListViewController to VIP
- Loading branch information
Showing
16 changed files
with
201 additions
and
118 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
31 changes: 31 additions & 0 deletions
31
SWDestinyTrades/Classes/PeopleList/Factory/PeopleListViewControllerFactory.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,31 @@ | ||
// | ||
// PeopleListViewControllerFactory.swift | ||
// SWDestinyTrades | ||
// | ||
// Created by Diogo Autilio on 04/03/24. | ||
// Copyright © 2024 Diogo Autilio. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
final class PeopleListViewControllerFactory: ViewControllerFactory { | ||
|
||
private let database: DatabaseProtocol? | ||
|
||
init(database: DatabaseProtocol?) { | ||
self.database = database | ||
} | ||
|
||
func createViewController() -> UIViewController { | ||
let view = PeopleListTableView() | ||
let viewController = PeopleListViewController(with: view) | ||
let router = PeopleListNavigator(viewController) | ||
let presenter = PeopleListPresenter(controller: viewController, | ||
database: database, | ||
navigator: router) | ||
viewController.presenter = presenter | ||
view.peopleListDelegate = presenter | ||
return viewController | ||
} | ||
} |
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
Binary file removed
BIN
-73.8 KB
...ntrollerTests/PeopleListViewController_with_a_person_with_borrowed_cards@3x.png
Binary file not shown.
Binary file removed
BIN
-75.9 KB
...ests/PeopleListViewController_with_a_person_with_lent_and_borrowed_cards@3x.png
Binary file not shown.
Binary file removed
BIN
-72.9 KB
...ewControllerTests/PeopleListViewController_with_a_person_with_lent_cards@3x.png
Binary file not shown.
Binary file removed
BIN
-71.9 KB
...ViewControllerTests/PeopleListViewController_with_a_person_with_no_loans@3x.png
Binary file not shown.
Binary file removed
BIN
-63.1 KB
...tViewControllerTests/PeopleListViewController_with_an_empty_state_layout@3x.png
Binary file not shown.
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
Oops, something went wrong.