summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Bulhak <andrew.bulhak@mullvad.net>2025-04-22 16:49:30 +0200
committerAndrew Bulhak <andrew.bulhak@mullvad.net>2025-05-09 15:18:30 +0200
commit374985bb9d51bdbea21733cfbabfbd78125c67b1 (patch)
tree1ca90f2287419ef65fe98286e045f65400641933
parent952e482afaae9fb7f1bae56e4ede2bd3a7579788 (diff)
downloadmullvadvpn-374985bb9d51bdbea21733cfbabfbd78125c67b1.tar.xz
mullvadvpn-374985bb9d51bdbea21733cfbabfbd78125c67b1.zip
Replace standard navigation title with self-provided one
-rw-r--r--ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift20
1 files changed, 17 insertions, 3 deletions
diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift
index 9b36dcc530..deb294ee73 100644
--- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift
+++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift
@@ -53,10 +53,13 @@ class EditAccessMethodViewController: UIViewController {
isModalInPresentation = true
+ let title = createTitle()
let headerView = createHeaderView()
- view.addConstrainedSubviews([headerView, tableView]) {
- headerView.pinEdgesToSuperviewMargins(PinnableEdges([.leading(8), .trailing(8), .top(0)]))
+ view.addConstrainedSubviews([title, headerView, tableView]) {
+ title.pinEdgesToSuperviewMargins(PinnableEdges([.leading(7), .trailing(7), .top(0)]))
+ headerView.pinEdgesToSuperviewMargins(PinnableEdges([.leading(8), .trailing(8)]))
tableView.pinEdgesToSuperview(.all().excluding(.top))
+ headerView.topAnchor.constraint(equalTo: title.bottomAnchor, constant: 0)
tableView.topAnchor.constraint(equalTo: headerView.bottomAnchor, constant: 20)
}
@@ -69,6 +72,16 @@ class EditAccessMethodViewController: UIViewController {
interactor.cancelProxyConfigurationTest()
}
+ private func createTitle() -> UIView {
+ let label = UILabel()
+ label.font = UIFont.boldSystemFont(ofSize: 34.0)
+ label.numberOfLines = 0
+ label.text = subject.value.navigationItemTitle
+ label.textColor = UIColor.NavigationBar.titleColor
+ label.backgroundColor = .clear
+ return label
+ }
+
private func createHeaderView() -> UIView {
var headerView: InfoHeaderView?
@@ -343,7 +356,8 @@ extension EditAccessMethodViewController: UITableViewDelegate {
// MARK: - Misc
private func configureNavigationItem() {
- navigationItem.title = subject.value.navigationItemTitle
+ navigationItem.largeTitleDisplayMode = .never
+ navigationItem.title = ""
}
private func onSave() {