This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard let containerBar = UIApplication.shared.value(forKey: "statusBar") as? UIView else { return true } | |
guard let statusBarMorden = NSClassFromString("UIStatusBar_Modern"), containerBar.isKind(of: statusBarMorden), let statusBar = containerBar.value(forKey: "statusBar") as? UIView else { return true } | |
guard let foregroundView = statusBar.value(forKey: "foregroundView") as? UIView else { return true } | |
for (index, subview) in foregroundView.subviews.enumerated(){ | |
switch index { | |
case 1: | |
subview.backgroundColor = .red | |
case 2: | |
subview.backgroundColor = .red |