Newer
Older
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
45
46
47
48
import UIKit
import Theme
import Shared
import DependencyInjection
public final class SearchContainerController: UIViewController {
@Dependency private var statusBarController: StatusBarStyleControlling
lazy private var screenView = SearchContainerView()
public override func loadView() {
view = screenView
}
public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
statusBarController.style.send(.darkContent)
navigationController?.navigationBar.customize(
backgroundColor: Asset.neutralWhite.color
)
}
public override func viewDidLoad() {
super.viewDidLoad()
setupNavigationBar()
}
private func setupNavigationBar() {
navigationItem.backButtonTitle = " "
let titleLabel = UILabel()
titleLabel.text = Localized.Ud.title
titleLabel.textColor = Asset.neutralActive.color
titleLabel.font = Fonts.Mulish.semiBold.font(size: 18.0)
let backButton = UIButton.back()
backButton.addTarget(self, action: #selector(didTapBack), for: .touchUpInside)
navigationItem.leftBarButtonItem = UIBarButtonItem(
customView: UIStackView(arrangedSubviews: [backButton, titleLabel])
)
}
@objc private func didTapBack() {
navigationController?.popViewController(animated: true)
}
}