-
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.
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
iOS/Projects/Features/Home/Sources/Coordinator/HomeCoordinator.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 @@ | ||
// | ||
// HomeCoordinator.swift | ||
// HomeFeature | ||
// | ||
// Created by MaraMincho on 12/5/23. | ||
// Copyright © 2023 kr.codesquad.boostcamp8. All rights reserved. | ||
// | ||
|
||
import Coordinator | ||
import Foundation | ||
import UIKit | ||
|
||
// MARK: - HomeCoordinating | ||
|
||
public protocol HomeCoordinating: Coordinating { | ||
func pushHome() | ||
} | ||
|
||
// MARK: - HomeCoordinator | ||
|
||
public final class HomeCoordinator: HomeCoordinating { | ||
public var navigationController: UINavigationController | ||
|
||
public var childCoordinators: [Coordinator.Coordinating] = [] | ||
|
||
public var finishDelegate: CoordinatorFinishDelegate? | ||
|
||
public var flow: CoordinatorFlow | ||
public init(navigationController: UINavigationController, delegate: CoordinatorFinishDelegate) { | ||
self.navigationController = navigationController | ||
finishDelegate = delegate | ||
flow = .login | ||
} | ||
|
||
public func start() { | ||
pushHome() | ||
} | ||
|
||
public func pushHome() { | ||
let viewModel = HomeViewModel() | ||
|
||
let viewController = HomeViewController(viewModel: viewModel) | ||
|
||
navigationController.pushViewController(viewController, animated: true) | ||
} | ||
|
||
public func pushBoardDetail() {} | ||
} |
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,9 @@ | ||
// | ||
// HomeRepository.swift | ||
// HomeFeature | ||
// | ||
// Created by MaraMincho on 12/7/23. | ||
// Copyright © 2023 kr.codesquad.boostcamp8. All rights reserved. | ||
// | ||
|
||
import Foundation |