-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
205 changed files
with
4,890 additions
and
452 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// DefaultsFindRoadCoordinator.swift | ||
// TWTW | ||
// | ||
// Created by 박다미 on 2023/12/18. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
final class DefaultsFindRoadCoordinator: FindRoadCoordinator { | ||
|
||
var childCoordinators: [Coordinator] = [] | ||
var navigationController: UINavigationController | ||
private var findRoadViewModel: FindRoadViewModel? | ||
|
||
// MARK: - Init | ||
init(navigationController: UINavigationController) { | ||
self.navigationController = navigationController | ||
findRoadViewModel = FindRoadViewModel(coordinator: self) | ||
|
||
} | ||
func start() { | ||
guard let findRoadViewModel = findRoadViewModel else { return } | ||
|
||
let findRoadController = FindRoadViewController(viewModel: findRoadViewModel) | ||
self.navigationController.pushViewController(findRoadController, animated: true) | ||
} | ||
} |
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 @@ | ||
// | ||
// FindRoadCoordinator.swift | ||
// TWTW | ||
// | ||
// Created by 박다미 on 2023/12/18. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol FindRoadCoordinator: Coordinator {} |
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,34 @@ | ||
// | ||
// FindRoadViewController.swift | ||
// TWTW | ||
// | ||
// Created by 박다미 on 2023/12/18. | ||
// | ||
|
||
import RxCocoa | ||
import RxSwift | ||
import SnapKit | ||
import UIKit | ||
|
||
final class FindRoadViewController: UIViewController { | ||
private let disposeBag = DisposeBag() | ||
private var viewModel: FindRoadViewModel | ||
|
||
// MARK: - Init | ||
init(viewModel: FindRoadViewModel) { | ||
self.viewModel = viewModel | ||
super.init(nibName: nil, bundle: nil) | ||
} | ||
|
||
@available(*, unavailable) | ||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: View Did Load | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
view.backgroundColor = .white | ||
|
||
} | ||
} |
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,50 @@ | ||
// | ||
// FindRoadViewModel.swift | ||
// TWTW | ||
// | ||
// Created by 박다미 on 2023/12/18. | ||
// | ||
|
||
import RxCocoa | ||
import RxRelay | ||
import RxSwift | ||
import UIKit | ||
|
||
final class FindRoadViewModel { | ||
private let disposeBag = DisposeBag() | ||
weak var coordinator: DefaultsFindRoadCoordinator? | ||
|
||
|
||
struct Input { | ||
// 3.길찾기 버튼 | ||
let clickedConfirmEvents: ControlEvent<Void>? | ||
} | ||
|
||
struct Output { | ||
} | ||
// MARK: - Init | ||
init(coordinator: DefaultsFindRoadCoordinator) { | ||
self.coordinator = coordinator | ||
} | ||
|
||
// create Output | ||
/// - Parameter input: Input Model | ||
/// - Returns: Output Model | ||
func createOutput(input: Input) -> Output { | ||
let output = Output() | ||
|
||
input.clickedConfirmEvents? | ||
.bind { [weak self] in | ||
guard let self = self else { return } | ||
moveToFindRoad() | ||
} | ||
.disposed(by: disposeBag) | ||
|
||
return output | ||
} | ||
/// 길찾기 화면으로 | ||
func moveToFindRoad() { | ||
coordinator?.start() | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// Caller.swift | ||
// TWTW | ||
// | ||
// Created by 박다미 on 2023/12/17. | ||
// | ||
|
||
import Foundation | ||
|
||
enum FriendListCaller { | ||
case fromPartiSetLocation | ||
case fromTabBar | ||
} |
12 changes: 12 additions & 0 deletions
12
TWTW/TWTW/FriendsList/Protocol/FriendsListCoordinatorDelegate.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,12 @@ | ||
// | ||
// FriendsListCoordinatorDelegate.swift | ||
// TWTW | ||
// | ||
// Created by 박다미 on 2023/12/17. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol FriendsSendListCoordinatorDelegate: AnyObject { | ||
func didSelectFriends(_ friends: [Friend]) | ||
} |
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.