Created
May 30, 2017 17:46
-
-
Save mclaughj/5a6e00567680e58275fdb67396f92db2 to your computer and use it in GitHub Desktop.
Mimicking the Things.app 3.0 status bar tinting
This file contains hidden or 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
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
var overlayWindow = UIWindow() | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
overlayWindow.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 20) | |
overlayWindow.windowLevel = UIWindowLevelStatusBar | |
overlayWindow.backgroundColor = UIColor(white: 1, alpha: 0.4) | |
overlayWindow.rootViewController = UIViewController() | |
overlayWindow.isHidden = false | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment