blob: 13da20e9343318479c1a454a9d8b1d96ccfa4c02 (
plain)
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
|
//
// SelectLocationNavigationController.swift
// MullvadVPN
//
// Created by pronebird on 22/07/2020.
// Copyright © 2020 Mullvad VPN AB. All rights reserved.
//
import Foundation
import UIKit
class SelectLocationNavigationController: UINavigationController {
init(contentController: SelectLocationViewController) {
super.init(navigationBarClass: CustomNavigationBar.self, toolbarClass: nil)
navigationBar.barStyle = .black
navigationBar.tintColor = .white
navigationBar.prefersLargeTitles = false
(navigationBar as? CustomNavigationBar)?.prefersOpaqueBackground = true
self.viewControllers = [contentController]
}
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
// This override has to exist to prevent crash on iOS 12 where `UINavigationController`
// calls `self.init(nibName:bundle:)` internally.
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
|