-
Notifications
You must be signed in to change notification settings - Fork 0
/
LoggedInRouter.swift
38 lines (30 loc) · 1.15 KB
/
LoggedInRouter.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// LoggedInRouter.swift
// TodoList
//
// Created by 김종권 on 2021/04/29.
//
import RIBs
protocol LoggedInInteractable: Interactable {
var router: LoggedInRouting? { get set }
var listener: LoggedInListener? { get set }
}
protocol LoggedInViewControllable: ViewControllable {
// TODO: Declare methods the router invokes to manipulate the view hierarchy. Since
// this RIB does not own its own view, this protocol is conformed to by one of this
// RIB's ancestor RIBs' view.
}
final class LoggedInRouter: Router<LoggedInInteractable>, LoggedInRouting {
// TODO: Constructor inject child builder protocols to allow building children.
init(interactor: LoggedInInteractable, viewController: LoggedInViewControllable) {
self.viewController = viewController
super.init(interactor: interactor)
interactor.router = self
}
func cleanupViews() {
// TODO: Since this router does not own its view, it needs to cleanup the views
// it may have added to the view hierarchy, when its interactor is deactivated.
}
// MARK: - Private
private let viewController: LoggedInViewControllable
}