We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cbe8f3 commit c3cb150Copy full SHA for c3cb150
KRProgressHUD/Classes/KRProgressHUDViewController.swift
@@ -8,13 +8,18 @@
8
import UIKit
9
10
class KRProgressHUDViewController: UIViewController {
11
+ var statusBarHidden = false
12
+
13
override func viewDidLoad() {
14
super.viewDidLoad()
15
view.backgroundColor = UIColor(white: 0, alpha: 0.4)
16
}
17
18
override func prefersStatusBarHidden() -> Bool {
- guard let vc = UIApplication.topViewController() else { return false }
- return vc.prefersStatusBarHidden()
19
+ guard let vc = UIApplication.topViewController() else { return statusBarHidden }
20
+ if !vc.isKindOfClass(KRProgressHUDViewController) {
21
+ statusBarHidden = vc.prefersStatusBarHidden()
22
+ }
23
+ return statusBarHidden
24
25
0 commit comments