summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2020-07-23 09:31:47 +0300
committerAndrej Mihajlov <and@mullvad.net>2020-07-23 15:13:24 +0300
commitbcd40023caecb09dfc551a7ecafafb4011867340 (patch)
tree9585bb219465791d99c62476ae7ce138948db2e4
parent970e46819ba06b1383bd10692d426b4cea0573c8 (diff)
downloadmullvadvpn-bcd40023caecb09dfc551a7ecafafb4011867340.tar.xz
mullvadvpn-bcd40023caecb09dfc551a7ecafafb4011867340.zip
State the reason for override of `init(nibName:bundle:)`
-rw-r--r--ios/MullvadVPN/SelectLocationNavigationController.swift10
1 files changed, 6 insertions, 4 deletions
diff --git a/ios/MullvadVPN/SelectLocationNavigationController.swift b/ios/MullvadVPN/SelectLocationNavigationController.swift
index 2f7eb0008b..08c3b3b7e8 100644
--- a/ios/MullvadVPN/SelectLocationNavigationController.swift
+++ b/ios/MullvadVPN/SelectLocationNavigationController.swift
@@ -19,10 +19,6 @@ class SelectLocationNavigationController: UINavigationController {
weak var selectLocationDelegate: SelectLocationDelegate?
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: nil, bundle: nil)
- }
-
init() {
super.init(navigationBarClass: CustomNavigationBar.self, toolbarClass: nil)
@@ -45,6 +41,12 @@ class SelectLocationNavigationController: UINavigationController {
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")
}