-
Notifications
You must be signed in to change notification settings - Fork 22
/
ThankYouViewController.swift
44 lines (33 loc) · 1.34 KB
/
ThankYouViewController.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
39
40
41
42
43
44
import UIKit
class ThankYouViewController: UIViewController {
private let viewModel: ThankYouViewModel
@IBOutlet var titleLabel: UILabel!
@IBOutlet var subtitleLabel: UILabel!
@IBOutlet var viewExposuresButtonLabel: UIButton!
@IBOutlet var homeButtonLabel: UIButton!
@IBAction func viewExposuresButtonAction(_: UIButton) {
viewModel.onSeeAlertsClick()
}
@IBAction func homeButtonAction(_: UIButton) {
viewModel.onCloseClick()
}
init(viewModel: ThankYouViewModel) {
self.viewModel = viewModel
super.init(nibName: String(describing: Self.self), bundle: nil)
title = viewModel.title
}
required init?(coder _: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor(patternImage: UIImage(named: "Background_purple.png")!)
titleLabel.text = L10n.Thankyou.title
subtitleLabel.text = L10n.Thankyou.subtitle
viewExposuresButtonLabel.setTitle(L10n.Ux.Thankyou.viewExposures, for: .normal)
homeButtonLabel.setTitle(L10n.Ux.Thankyou.home, for: .normal)
ButtonStyles.applyUnselected(to: viewExposuresButtonLabel)
ButtonStyles.applyUnselected(to: homeButtonLabel)
navigationItem.hidesBackButton = true
}
}