-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathForgottenPasswordViewController.swift
More file actions
42 lines (33 loc) · 1.11 KB
/
ForgottenPasswordViewController.swift
File metadata and controls
42 lines (33 loc) · 1.11 KB
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
39
40
41
42
//
// ForgottenPasswordViewController.swift
// RoutingExample
//
// Created by Cassius Pacheco on 7/3/20.
// Copyright © 2020 Cassius Pacheco. All rights reserved.
//
import UIKit
final class ForgottenPasswordViewController: UIViewController {
private let viewModel: ForgottenPasswordViewModelInterface
init(viewModel: ForgottenPasswordViewModelInterface) {
self.viewModel = viewModel
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
print("👶 \(self) Created")
let resetPasswordButton = DefaultButton(title: "Reset password", target: self, selector: #selector(resetPasswordButtonTouchUpInside))
view.addSubview(resetPasswordButton)
resetPasswordButton.layout.center(in: view)
}
@objc
private func resetPasswordButtonTouchUpInside() {
viewModel.resetPasswordButtonTouchUpInside()
}
deinit {
print("♻️ \(self) Deallocated")
}
}